Add an Eclipse 4.4 Perspective in existing Eclipse 3 Application - java

I have an existing Eclipse 3 RCP application (the compatibility layer is already added to the existing application) in which I would like to add a perspective (of course containing parts, toolbars, menus..) developed with Eclipse 4.4 (Luna).
1) Is this possible ?
2) If, yes could you please give me more information on how to do that and perhaps links containing more informations ?
UPDATE : So I finally manage it to make it work so for those of you who had the same questions here are the answers. So yes it is possible to mix Eclipse 3 and Eclipse 4(some complications but you can manage it :) ) for more information on how I did you can go to the link I left in a comment down below. Hope this going to be helpfull :)

You can likely do something close. You could implement the 'createInitialPerspective' method of the your IPerspectiveFactory to downCast the given IPageLayout to its underlying class "ModeledPageLayout". This will give you access to the new MPerspective's model (as well as the useful utility methods). Then you're off to the races and can set the model for your perspective up as you desire (as long as the result can be rendered).

I tried something that Alexander adviced me to do and it worked perfectly :) The only issue that I have now, is how to add the perspective added to the perspective switcher. (The method I followed enabled me to add the perspective but when I run the application it is displayed in the tool bar and I don't want it to be like that I want it to be only present in the perspective switcher). Anyway here's the link for the solution I tried. Hope this gona be help full.
https://www.eclipse.org/forums/index.php/m/1690630/#msg_1690630

Related

How to create code review request with Team Explorer Everywhere?

We can create code review request from Visual Studio. Behind the scenes it creates a shelve set & code review request work item. Reviewer can review the code changes which further creates a TFS work item (code review response). Everything is captured in the TFS.
I could not find the same option in the TEE plug-in. Can anybody tell how can I achieve the same workflow? I do not want to manually create the shelve set & work item. Is there any plug-in available to achieve this?
Currently TEE does not support code reviews, still on the backlog.
I can't give you an exact (or, frankly, even an approximate) date.
There is a long list of priorities - code review support in TEE being
one of them. In April, we will start planning for our next update and
will see where this lands.
Believe me, we like this feature (and could use it ourselves).
Any other opinions/thoughts from the community are also useful to have
--- so, feel free to respond on this thread or reach out to me directly (wismythe AT microsoft.com).
Will Smythe
Program Manager, Team Explorer Everywhere
More detail info you can take a look at this similar question in MSDN: Code Review functionality in TFS plugin for Eclipse

Android Studio: How to choose what to import from VCS

I'm using Android Studio 2.1, which is based on IntelliJ IDEA 2016.
If you select VCS -> Commit changes there's a nice dialog showing all the modified files and you are able to choose what to commit.
However when selecting VCS -> Update project there's no dialog. You have to update everything give or take.
I really miss eclipse's Team Syncronize perspective. It kicked ass compared to this, both for commiting and updating.
Is there a way of displaying a dialog to select which files to update? Or maybe some plugin? I'm getting tired of importing workspace metadata from other team members, or even broken builds when doing bulk updates. The only workaround seems to be looking at the incoming tab first, and then right click over the files you want, which is not very efficient as you have to expand their packages or parent folder first, and you might also need to manually refresh the incoming tab.
Yes that's a nice question but unforunately we have no ways First thing first to checkout documentation of IntelliJ IDEA 2016.1 Help given here but not in depth. As vcs-> update will update all files from remote branch and it will never provide you options because it is not implemented yet !!
Also see comments discussion on this answer they have talked about whole issue you have here the question asked little matching with yours is this which is the same having this discussion.
This is unlikely to be an issue with the Android tooling and more likely an issue with the underlying intellij idea software.
This is already discuss over here in google code issues :
https://code.google.com/p/android/issues/detail?id=184086
I have already tried to search plugin or help software but coudn't find one. :(
You just can add a .gitignore file for metadata.
Although, when you update your project it's a good practise to commit files before (and choose only those files you want to update).
Regards!

HTMLSpanner. Incorporate into Eclipse project

I've been using Html.fromHtml to display html text into a TextView but am not completely happy primarily because it doesn't support bullet points (li, ol).
I've run across HTMLSpanner (at https://github.com/NightWhistler/HtmlSpanner) and it looks like something worthwhile exploring.
Trouble is, I'm using Eclipse and, being somewhat new to this world of java, am not clear as to how to incorporate that code into my project.
I have incorporated other private libraries (like sqliteassethelper & photozoom), but HTMLSpanner is confusing me.
Can anybody help?
Right, after getting help from the author of HtmlSpanner (Alex Kuiper), here's what needs to be done:
Retrieve Jars. You need HtmlSpanner and HtmlCleaner. These can be acquired from the Pagecleaner repo (use the latest version) and here (note: HtmlCleaner versions above 2.2 will NOT work)
Add them into your project as "External jars" (Properties -> Java Build Path -> Libraries -> Add External Jars). Also check them in "Order and Export"
Modify code. Replace Html.fromHtml() with new HtmlSpanner().fromHtml() as in tv_question.setText(new HtmlSpanner().fromHtml(mtext));
I needed HtmlSpanner primarily for the additional "list" functionality, so I've been focusing on that ... and found a few minor issues:
Nested lists. Need to add a break at the start of the child, as in <ol><li>This is part of the parent list <br><ul><li>First child list item"
Regular text following list. Need to add a paragraph break plus a regular break to get the single-line gap. As in ...list ended.</li></ul><p><br>Regular paragraph started...
The numbered list. Does not provide a blank after the "number.". As in, <ol><li>Apples (and all subsequent list items) will show up as "1.Apples", not "1. Apples". I have not found a workaround for this.
Underline. <u>...</u> does not work.
My environment: Ubuntu 12.04, Eclipse 4.2.1 (Juno), Android API 20
Overall, a fantastic set of classes that I am thrilled to have access to. Many thanks, again, to Alex.

Netbeans refuses to auto suggest known classes for imports

I just discovered that my NetBeans suddenly stops importing classes that are found in the Java API but can still import classes from my external libraries. Take a look at the image below:
As you can see, List and ArrayList are classes from the java.util package but the usual suggestions for importing them are not shown here, instead it is asking me to create class. I know that I can type import java.util.List; on the top of the code but life was better before! Please I need help thanks.
I had the same problem a couple minutes ago... Terrible. The same problem has been reported here:
Bug 235712
The solution which I've found there was sufficient - simply delete the Netbeans cache...
In order to do this, go to Help ==> About . Then go to the directory with cache and delete all you find in the "index" catalog.
After restarting the NB, everything was cool.
Today I came across the same problem. It happens that it actually is very easy to exclude a class from code completion if you click in the wrong place while working.
To solve it (netbeans 8.2) go to
Tools - Options -> Editor tab
Then select Code Completion Tab
In the drop Down select JAVA (in my case it was Java)
You will find a box bellow titled Package/Classes
In the EXCLUDE tab you probably will find the packages marked to be excluded from code completion. Just remove the ones you want back.
Check under Preferences->Editor->Code Completion to make sure auto complete is on, though by your screen shot I assume that it is.
Also try Preferences->Editor->Formatting and set your Language to Java
In my case, NetBeans was refusing to suggest Scanner. As it turned out, all I had to do was remove java.util.Scanner from Options » Editor » Code Completion » Packages/classes: » Exclude. Then the autocompletion for Scanner returned.

Eclipse preference page with multiple arrays

I tried to search the internet for examples for doing that, but can not find a good one. Also I checking eclipse IDE source code, but it's a bit too big to filter out what I need for an example.
What I would need is something similar to Eclipse File Association page below.
My plan is later to replace File types list with a combo and add more values/controls per combo selection.
I would be very thankful for an example or a link to an example that does that or has a same concept with working preference store.
Thank you!
You can take a look at the Google Eclipse plugin source code. I had to achieve something similar to your needs, and inspired myself from there. It is properly designed. You can take a look at the repository right here.
In my case, I needed checkboxes instead of combos, and used a CheckboxTableViewer from the JFace library, there are plenty of example onlines (e.g: JFace snippets).
As Alex said, first, works on Eclipse preferences concept... when you got it, it will just stay some pure UI tasks.
Well, I think that it is nothing more then simple preferences page with two Lists which just represents conformity between file types and editors.
The example how to implement your own preferences page is here: Eclipse Preferences - Tutorial
If you want to have Combo - there is no problem - you just replace upper ListEditor woth your ComboFieldEditor and proceed with adding more conrols. The file associations are stored in Eclipse preferences and you can access them whenever you try to open some file to retrieve corresponding editor.

Categories