eclipse-pde

How to determine which eclipse dependencies to use

血红的双手。 提交于 2019-12-11 15:45:01
问题 In the eclipse PDE, when I copy a snippet from the internet and I'm lacking dependencies, how do I figure out which dependencies I need to import? Say that I have this snippet: public static IMethod getSelectedMethod() throws JavaModelException { IWorkbenchPage page = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage(); ITextEditor editor = (ITextEditor) page.getActiveEditor(); IJavaElement elem = JavaUI.getEditorInputJavaElement(editor .getEditorInput()); if (elem

Eclipse plugin: overriding standard command handler

こ雲淡風輕ζ 提交于 2019-12-11 03:03:48
问题 I'm trying to override an existing command handler in Eclipse. Specifically, I want to override the Run command (org.eclipse.debug.ui.commands.RunLast) so that it first terminates the process from the previous launch before starts the new one. I read this article, wrote a handler and associated it with the Run command: <extension point="org.eclipse.ui.handlers"> <handler commandId="org.eclipse.debug.ui.commands.RunLast" class="net.anggo.tnr.TnRHandler"> <activeWhen> <with variable=

Eclipse plugin : disable/enable dynamically an action from main menubar

。_饼干妹妹 提交于 2019-12-11 02:44:22
问题 EDIT : SOLVED Background I have implemented a eclipse plugin (on indigo, 3.7.2) that provide a new icon in the bar menu. This new action is fully initialized few seconds after eclipse startup (some configuration files are loaded from my maven repository). I'm trying to disable this action until my activator finish initalization. What I'm looking for Before initialization After initialization What I've already done I added an enablement test on my action. My action will be enabled only if my

How do I fix eclipse warning: “It is recommended for plug-in 'XXX' to run from a JAR, specify 'unpack=”false“' attribute”

末鹿安然 提交于 2019-12-10 17:54:24
问题 The plug-in really needs to be unpacked, yes I know it shouldn't care, but it does. I just want to make this warning go away, how do I do that? 回答1: Try setting Bundle-ClassPath in your manifest. This header tells OSGi where in your bundle to find the classes. If not specified, the default value is " . ", which means the root of your bundle. PDE/UI is basing this warning on whether or not it thinks your bundle should be a jar. One of the things it bases the decision on is whether or not the

install plugin spy plugin into custom rcp application

时光总嘲笑我的痴心妄想 提交于 2019-12-10 16:44:18
问题 Plugin spy is included into Eclipse since 3.4. I wonder if there is somewhere separate plugin distribution, so it could be used to install into custom rcp application. In my case it is jubula if this information is necessary. 回答1: Using the Plug-in Registry view, you can see the spy is defined in org.eclipse.pde.runtime . Just include this in your application. The only mandatory dependencies are for org.eclipse.core.runtime , org.eclipse.ui , and org.eclipse.ui.forms - the rest are optional..

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

爱⌒轻易说出口 提交于 2019-12-10 03:14:20
问题 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

Unable locate installable unit in target definition

我们两清 提交于 2019-12-09 16:09:34
问题 I created my own target definition. It worked perfectly until now. Today I opened this target definition and got following error for all software sites I have there: Unable to locate installable unit <unit name> The target definition file looks like this: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde version="3.6"?> <target name="indigo" sequenceNumber="20"> <locations> <location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">

Get associated file extensions for an Eclipse editor

送分小仙女□ 提交于 2019-12-08 11:35:05
问题 I'm trying to programmatically retrieve the associated file extensions for a specific editor from within my (DLTK based) Eclipse plugin. The reason for it is that I only want to index files that are associated to my editor, and I need to avoid hardcoding the extensions as users are able to associate any file extension to the editor via the Eclipse preferences. Example code: public boolean isValidPluginFile(ISourceModule sourceModule) { // currently: if (sourceModule.getUnderlyingResource()

Getting an error(MESSAGE A handler conflict occurred. This may disable some commands) when launching eclipse

大兔子大兔子 提交于 2019-12-08 07:55:29
问题 I developed one plugin(RMP) in eclipse 3.3.2 where i am creating menu items dynamically. I ran the application and it is working fine and am able to see the menu items created dynamically. Now I exported this plugin(RMP). I added this in plugin folder of eclipse 3.4 installation. Now I launched eclipse and I am able to see all the functionalities implemented in my plugin(RMP) but the menu items created dynamically are invisible. When i click on menu, nothing is coming. Pls find the error log

How to capture changes inside methods in an Eclipse plugin

谁都会走 提交于 2019-12-07 19:39:13
问题 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