eclipse-pde

Using a ILightweightLabelDecorator decorator

坚强是说给别人听的谎言 提交于 2019-12-07 05:09:34
问题 Having implemented one of the above, can anyone say how I might wire it up directly to a viewer? None of the usual sources explain. Martin. 回答1: As far as I can tell you need an ILabelDecorator and the only easy way to get one is to use the workbench UI: viewer.setLabelProvider( new DecoratingLabelProvider(new MyPlainLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator())); You then need to add your lightweight decorator to the decorators extension point in the

How to capture changes inside methods in an Eclipse plugin

家住魔仙堡 提交于 2019-12-06 14:01:02
As part of my Eclipse plugin project I need to track additions, deletions and changes to methods in order to implement the functionality I'm after. By registering a listener through JavaCore.addElementChangedListener and recursively traversing the IJavaElementDelta until the IJavaElementDelta.getElement() gives a reference to an affected method, I am able to capture method additions and deletions. E.g. I add method a into class B I get: [Working copy] B.java[*]: {CHILDREN | FINE GRAINED | AST AFFECTED} B[*]: {CHILDREN | FINE GRAINED} a()[+]: {}] The problem is that this does not take place

How to use Eclipse 3.x views in E4?

六眼飞鱼酱① 提交于 2019-12-06 11:59:40
I am experienced with Eclipse 3.x development and now want to develop an E4 application. Therefor I tested a simple example in order to get started with the new things. I was following this tutorial step by step but it results in the same error. However, he is not getting those errors. I'm using Eclipse Luna (4.4.2) and installed the E4 Tools (0.17) . I've created a new Eclipse 4 Application and added to the Application.e4xmi the Common Resource Navigator (Project Explorer) as Shared Part using Import 3x -> View as CompatibilityView. I then added a Placeholder which references the shared part.

How do I update an Eclipse template variable on the fly?

烂漫一生 提交于 2019-12-06 10:31:34
问题 I've added the following new Eclipse template via extension point. It simply adds a template for a sample testTag tag. <!-- Add code template --> <extension point="org.eclipse.ui.editors.templates"> <template autoinsert="true" contextTypeId="html_tag" description="[Description] Template populated by Snippet values ***" id="org.eclipse.jst.jsf.ui.newHtmltag" name="testTag"> <pattern> <![CDATA[ <testTag style="background: ${color}"></testTag> ]]> </pattern> </template> <resolver contextTypeId=

Eclipse Plugin: Creating a dynamic menu and corresponding handler?

▼魔方 西西 提交于 2019-12-06 08:13:49
问题 I am trying to write what I think is a very simple Eclipse plugin, but I am really struggling to find my way around as I have never worked with the PDE before. Basically what I am trying to do is add a sub-menu to the Java Project context menu that will list a bunch of available files in the project's root directory. Then upon selecting one of these sub-menu items I want the handler to be called and passed the name of the file that was selected. So far I have managed to get the menu to appear

Eclipse PDE: Custom QuickFix only available in Problems View?

心已入冬 提交于 2019-12-06 01:33:22
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

Prevent caching of Eclipse target definition

Deadly 提交于 2019-12-05 11:55:49
I'm using a target definition that references a P2 update site. Update site was updated recently with a plugin that has same version and qualifier as previous version, but different content. I've deleted .metadata/.plugins/org.eclipse.pde.core and tried resolving and applying target definition again. Strangely, target definition recreates previous version of plugin in .metadata.plugins\org.eclipse.pde.core.bundle_pool (I'm checking its content and behaviour) Where could the content be cached and how do I flush this cache? Version: Kepler Service Release 2 Build id: 20140224-0627 Update site

Using a ILightweightLabelDecorator decorator

≯℡__Kan透↙ 提交于 2019-12-05 09:08:13
Having implemented one of the above, can anyone say how I might wire it up directly to a viewer? None of the usual sources explain. Martin. JB. As far as I can tell you need an ILabelDecorator and the only easy way to get one is to use the workbench UI: viewer.setLabelProvider( new DecoratingLabelProvider(new MyPlainLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator())); You then need to add your lightweight decorator to the decorators extension point in the plugin.xml . Obviously, this will only work if your app is an Eclipse plugin. It seems odd that

Eclipse editor plugin: “ERROR” when opening file outside project

自闭症网瘾萝莉.ら 提交于 2019-12-05 02:58:53
I'm developing an editor plugin for eclipse. It works fine on files within eclipse projects, but when an external file is opened via the "File -> Open File" menu (which works file with, e.g. Java files), I get a page displaying nothing but a horizontal blue line and the word "ERROR". The Error Log of eclipse is empty, as is the log file in the .metadata directory. What could cause this? How can I diagnose the error when I have no error message that tells me where to look? There doesn't seem to be a way to get more detailed logging from eclipse. Edit: I've found that the source of the problem

Enumerating all my Eclipse editors?

那年仲夏 提交于 2019-12-05 00:05:54
问题 I have built a simple Eclipse plugin where a user may use a TableViewer of database resources to open an editor on any of those resources. Users may therefore have zero upwards instances of the editor running. Is there an API available to get a list of those editor instances? 回答1: You can get references to all open editors with: PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getActivePage().getEditorReferences(); And then check these to select the ones that reference instances of your