eclipse-plugin

how to create linked resources under virtual folder programmatically in eclipse

99封情书 提交于 2019-12-24 12:23:33
问题 I want to create linked resources under my virtual folder Folder folder = modelFolder.getFolder("Script_include"); folder.create(IResource.VIRTUAL, false, null); IFile newFile = folder.getFile("virtual"); newFile.createLink(location, IResource.NONE,null); I am getting virtual folder but not able to create linked file under it. 来源: https://stackoverflow.com/questions/30343564/how-to-create-linked-resources-under-virtual-folder-programmatically-in-eclipse

Compilation error when starting eclipse plugin. Can't find libraries even though they are all there

无人久伴 提交于 2019-12-24 11:36:36
问题 I am developing a plugin for eclipse and from time to time (yes, sometimes it works, sometimes not. Then I have to clean the project and restart everything.) I get the following error when activating it: Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle DeepRefactoring (501). at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:116) at org.eclipse.osgi.internal.loader.classpath.ClasspathManager

create a custom code completion for eclipse [closed]

旧街凉风 提交于 2019-12-24 11:08:48
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am trying to make a plugin for eclipse to add more results in the code completion window. In order to do that i need to get a reference to the Java Editor in order to override the getContentAssistant method of

Eclipse RCP: how to get Show View menu instead of a dialog

那年仲夏 提交于 2019-12-24 10:14:24
问题 I've added to my perspective's org.eclipse.ui.menus <command commandId="org.eclipse.ui.views.showView" style="pulldown"> </command> This adds Show View item to main menu, but this item is not a menu (as in the Eclipse Window menu). Instead pressing it shows a dialog where I can select a view. How do I get a menu instead? 回答1: You have to create ContributionItem class like below: public class MyShowViewContributionItem extends org.eclipse.ui.internal.ShowViewMenu { public

java.lang.Object can not be resolved. It is indirectly referenced from required .class files

左心房为你撑大大i 提交于 2019-12-24 09:58:08
问题 i am using eclipse 3.2 version. in sametime based i am getting error on package: java.lang.Object can not be resolved. It is indirectly referenced from required .class files. on build path JRE is JRE System Library [JavaSE-1.6] (unbound) when i set the JRE is JRE System Library [jclDesktop Win32 x86] then it give others errors like on function name of other classes. 回答1: There are a lot of differences between jclDesktop and Java 5. Which means, that Java code, written for Java 5 (or any other

Taking input from console in a plugin in java

久未见 提交于 2019-12-24 09:39:55
问题 I am developing an Eclipse plugin and I want to take input from the user. I had a problem before with dealing with the console as I have 2 consoles 1 in the original Eclipse application and the other in the new opened Eclipse plugin window. I used the method shown below to print in the Console of the Plugin public static void writeToConsole(String output) { MessageConsole console = new MessageConsole("My Console", null); console.activate(); ConsolePlugin.getDefault().getConsoleManager()

Convert from absolute path to IFile

不问归期 提交于 2019-12-24 09:27:17
问题 I am working at an eclipse plugin where the projects which exist in the Project Explorer view have a different workspace name than the actual path of the project. So considering a project located at D:\test when I try to get the project location, it points to D:\test_plugin_specific_suffix . Is there a way to get an IFile from an absolute path (which points to the local path, D:\test\testfile.txt )? I want to create a hyperlink to a specific file for which I have the absolute path. When I

Create an Eclipse plugin that responds to links in the internal web browser

落花浮王杯 提交于 2019-12-24 09:14:17
问题 Is there any way to hook into the eclipse web browser? I'm opening a link using IWorkbenchBrowserSupport.createBrowser, but after the page is launched I want to be able to take some action based on links clicked within the browser. Can you create a listener for browser events? 回答1: No. IWorkbenchBrowserSupport.createBrowser returns an IWebBrowser. The IWebBrowser interface only defines 3 methods. close() getId() openURL(URL url) I believe that openURL is used to navigate to another web page

“Comparison method violates its general contract!” when trying to install Eclipse plugin

一曲冷凌霜 提交于 2019-12-24 08:48:14
问题 I have following system: $ cat /etc/redhat-release Scientific Linux release 6.1 (Carbon) $ uname -a Linux wcmisdlin02.uftmasterad.org 2.6.32-279.9.1.el6.x86_64 #1 SMP Tue Sep 25 14:55:44 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux $ and I have following packages $ rpm -qa | grep ^eclipse eclipse-emf-2.6.0-1.el6.x86_64 eclipse-svnkit-1.3.0-3.el6.x86_64 eclipse-swt-3.6.1-6.13.el6.x86_64 eclipse-rcp-3.6.1-6.13.el6.x86_64 eclipse-rse-3.2-1.el6.x86_64 eclipse-jdt-3.6.1-6.13.el6.x86_64 eclipse-pde-3.6

Incorrect partition detected by PartitionScanner in custom TextEditor for eclipse

好久不见. 提交于 2019-12-24 08:24:47
问题 I have a PartitionScanner that extends RuleBasedPartitionScanner in my custom text editor plugin for Eclipse. I am having issues with the partition scanner detecting character sequences within larger strings, resulting in document being partitioned incorrectly. For example, within the constructor of m partition scanner I have following rule set-up: public MyPartitionScanner() { ... rules.add(new MultiLineRule("SET", "ENDSET", mytoken)); ... } However, if I happen to use a token that contains