I have successfully created a new view, passing in the primary ID from my plugin.xml and a unique secondary ID. All is well. It pops up as one would want.
However ... it pops up in completely the wrong folder.
I want it to go along side the other one's that are of the same type. It is the main folder center panel I want it created in. Now I can manually move it (as a user) and put it where I want it.
Feel so close to this.
What am I missing?
I am not clear by "wrong folder"?
Two things here.
First, if it's showing up in the wrong place in the workbench, then you need to use org.eclipse.ui.perspectiveExtensions extension to place it in the right place in the perspective.
Second, if it's not grouping with set of views, then you need to add "category" in the view extension to show up in the right category in "Show View".
Hope these two points will help you out. Please let me know if I completely missed your point.
Create a perspective extension and use the "relative" attribute of the view definition there.
I found the solution. When laying out the folders in the perspectiveExtensions extended class, I need to tell it where additional views will end up. You do this by calling the IFolderLayout.addPlaceholder() passing in the necessary wildcards where necessary.
bodyleft.addPlaceholder( "MyViewId:*" );
This works a charm.
Related
Good day,
In my tHashInput, I saw the component having the error sign, as follow:
I click on the component tab, try to figure out what is the error, however, I cant see anything inside.
But if I view it in java code, I can see where is the error, as follow:
Maybe previous developer want to put comment or print it, but make some mistake there.
May I know how can I comment this line? Java code is just for view only not editable right? Any way I can find in the Component tab for this sentence String?
I am new to Talend and first day working on Talend Studio.
you have to right click on the component then click on option Desactivate thashinput
Other information you need to know after , the tHashInput component must be intialized by a tHashOutput COmponent
I am new to Java and I am working on a project where depending on number of files in a directory,
buttons will be created respectively. Each button will have a customized right click context menu.
How can I achieve this or is this feasible?
I just want to know the approach to do this.
The approach that you may try:
While you iterate your directory/file list (or other process that will determine the button creation), you can generate (create an instance of) a new button (JButton), I assume you know how to use new, and put it on your form / panel.
However, most of the time, layout would become an annoying issue here.
Thus, you may try to use MigLayout to handle this.
It will help you a lot in putting your stuffs in a tidy and convenient way.
Try this approach and when you have a specific coding-part question, you can try to search the existing solution in SO (StackOverflow) or if it doesn't exist, you can ask that specific code-related question.
Hope it helps.
I am trying to create a panel which opens to the left of the rest of my GUI. I am working in Eclipse. I added swingx-core-1.6.2.jar to my build path. I can import org.jdesktop.swingx.JXCollapsiblePane and then make a new JXCollapsiblePane, but in order to set the orientation of the pane, I need to do something like:
JXCollapsiblePane myCollapsingPane = new JXCollapsiblePane();
mycollapsingPane.setOrientation(JXCollapsiblePane.Orientation.HORIZONTAL);
However, this fails saying that Orientation cannot be resolved. So, I tried importing
org.jdesktop.swingx.JXCollapsiblePane.Orientation, which also fails saying that it cannot be resolved.
I'm probably missing something silly here; how do I set the panel to open to the side rather than vertically?
JXCollapsiblePanel at 1.6.2 has no setOrientation method. Also, there is JXCollapsiblePane.Orientation enum any more. It was probably dropped.
However, there is JXCollapsiblePane.Direction and there JXCollapsiblePanel.setDirection(), it is probably a replacement.
Here is a thread about this.
Is there a way to do the following ?
I have a tree item icon which is for example :
http://cdn1.iconfinder.com/data/icons/DarkGlass_Reworked/128x128/actions/contents.png
and when a certain action occurs I want to add a flag on it ( the flag is an icon which will be place on it)
if the flag is the right mark so it should be like
http://store2.up-00.com/June12/yk105816.png
Simply, can I add image on image on an action ?
Note: I know I can do this in another way to change between the two images upon action.. but I'll have to do a loooot of work on paint of PS.
sorry for the links of images as as a new user I can't post images
What you want to achieve is called a decorator in Eclipse platform.
You can find a detailed description with example on this page: http://www.eclipse.org/articles/Article-Decorators/decorators.html
Check also the following stackoverflow question:
How to set the color of an Eclipse/RCP decorator?
How to remove a previously added decorator on a resource?
Hope this helps.
You can combine several images on the fly by using or subclassing org.eclipse.jface.resource.CompositeImageDescriptor.
i am having trouble with custom quick-fixes, which i want to provide in my Eclipse plug-in, and i'm hoping for someone more experienced than me in Eclipse PDE to have some hints for me on this issue.
As i have understood, i can provide custom so-called "quick fixes" (or "resolutions", in Eclipse inside terminology), by extending the extension point org.eclipse.ui.ide.markerResolution for a specific marker id, such as for example some default Eclipse marker, org.eclipse.core.resources.problemmarker.
This works for me for the default marker types and for custom marker types, BUT:
The QuickFixes, which my IMarkerResolutionGenerator provides, are only accessible from the "Problems"-View, not from the Editor, in which my markers show up.
What i have: I create markers in the default text editor, which causes (1) an icon with the markers tooltip message to show up on the left editor ruler at the line, which the marker is assigned to, (2) a marker on the right side of the editor, (3) some underlined characters in the editor, and (4) an entry in the "Problems"-view.
What i want: Just like in Java IDE support, i want to press Strg+1, or Context-Menu->Quick Fix, or to click at the error icon on the left-side-ruler, to see the available quick-fixes and to select one.
However: Only in the Problems-View am i able to get the Quick-Fixes, by pressing Strg+1 or from the context menu.
Is this the normal behaviour, and do i have to access another extension point, or the specific editors features, to hook my quick fixes into them? I haven't found anything much detailed about it, except that everybody seems to be pretty happy with this only extension point that i have mentioned above. What am i missing?
For completion, here is my extension point definition:
<extension point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="com.markers.test.MarkerResolutionGenerator"
markerType="org.eclipse.core.resources.problemmarker">
</markerResolutionGenerator>
</extension>
I have the same problem and I'm not sure, if this is the right way, but at least it works:
If you want to see your quick fixes in the source viewer you have to set an QuickAssistAssistant for it. In your class implementing SourceViewerConfiguration override getQuickAssistAssistant. You can instantiate org.eclipse.jface.text.quickassist.QuickAssistAssistant, but you have to set a QuickAssistProcessor, so implement the org.eclipse.jface.text.quickassist.IQuickAssistProcessor interface, especially computeQuickAssistProposals to return your quick fix proposals.
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
IQuickAssistAssistant quickAssist = new QuickAssistAssistant();
quickAssist.setQuickAssistProcessor(new MyQuickAssistProcessor());
quickAssist.setInformationControlCreator(getInformationControlCreator(sourceViewer));
return quickAssist;
}
Also have a look at the code in the last post here, it is a bit messy, but you will get it. And look at this code here for an example implementation of ICompletionProposal, which you will have to return in your QuickAssistProcessor.
If you simply add one line to the marker extension point:
<super type="org.eclipse.core.resources.textmarker"/>
and add attributes to the marker
marker.setAttribute(IMarker.CHAR_START, ...);
marker.setAttribute(IMarker.CHAR_END, ...);
You will be able get this:
But I still can't found how to change marker icon (to variant with bulb) a show possible quick fix also after click on the annotation icon.