eclipse-plugin

How to get resources path from an Eclipse plugin

故事扮演 提交于 2020-01-03 12:24:28
问题 I am developing an Eclipse plugin using Eclipse Plugin-in-project where it will add a menu item in the toolbar. My plugin project is depending on one file which is located in the same plugin project I want the path of that file. Below is the sample code I have used to get the path: Bundle bundle = Platform.getBundle("com.feat.eclipse.plugin"); URL fileURL = bundle.getEntry("webspy/lib/file.txt"); File file = null; String path=null; try { file = new File(FileLocator.resolve(fileURL).toURI());

Can't connect to Eclipse Marketplace

…衆ロ難τιáo~ 提交于 2020-01-03 08:26:27
问题 I am trying to install log4j Eclipse Plugin . But I'm Getting this error message : Unable to read repository at https://sourceforge.net/projects/oneclick-logger/files/site/content.xml. Received fatal alert: handshake_failure 回答1: I had the same issue for yet another plugin hosted on SourceForge. It seems to be a common issue. As stated in the comments above, this solution helped me: https://stackoverflow.com/a/38264878. But I had to go some extra steps to find which JRE my Eclipse

Hadoop eclipse mapreduce is not working?

无人久伴 提交于 2020-01-03 05:15:33
问题 I just have copied hadoop-eclipse-plugin-1.0.3.jar to the eclipse/plugins directory in order to get things going. But unfortunately it did not work for me. When I tried to connect eclipse to my Hadoop Version 1.1.1 cluster it threw this error : An internal error occurred during: "Map/Reduce location status updater". org/codehaus/jackson/map/JsonMappingException Is there any option to fix this? 回答1: Just follow these steps : 1- Go to your HADOOP_HOME/contrib folder. Copy the hadoop-eclipse

Reuse Project Explorer' view for your custom plugin project

蓝咒 提交于 2020-01-03 03:48:08
问题 I am working on a eclipse plugin and reusing the 'Project Explorer' view to display the tree content. I have few questions to make it best possible reuse: How can I disable the sort - currently 'Project Explorer' view sort tree nodes which I dont want. Is thr a single place where i can change the flags or something? Or I will have to implement a View Sorter ? How can I save the expanded state of projects the way it does for a java project , i want the same to implemented for custom plugin

FileLocator's method toFileURL ignores empty folders

天大地大妈咪最大 提交于 2020-01-03 01:47:12
问题 With aid of this and this questions I managed to create the most of the desired file structure in a project by copying this from my plugin bundle. URL templatesURL = Activator.getDefault().getBundle().getEntry(TEMPLATES_PATH); File templatesFolder = new File(FileLocator.toFileURL(templatesURL).getPath()); copyFiles(templatesFolder, project, monitor); I have two folders TEMPLATES_PATH + "\test\java" with no files in them. I want these to be created as well, but they don't. Investigations led

Eclipse “Open Type” dialog restricted to a particular interface

孤者浪人 提交于 2020-01-03 01:38:27
问题 I'm trying to create a JavaUI.createTypeDialog() which restricts the user to selecting only types belonging to a particular interface. How could I do this? 回答1: This answer shows how to obtain the type hierarchy for a particular type. You could use similar processing to obtain the TypeHierarchy for the interface, then populate the list with the resultant types. IProject project; //currently selected project //get the java project and locate the interface type JavaProject javaProject =

Jar files: why does extracting then compression a jar file create a file of a different size to the original?

强颜欢笑 提交于 2020-01-02 23:27:00
问题 I was trying to edit a single byte in an extracted Eclipse plugin jar file. I noticed that after I re-compressed the files as a jar, the resultant file was larger than the original (only 1%) and that the plugin didn't work. Eclipse booted, but shut down silently after selecting a workspace. Rolling back to the original plugin allowed it to start successfully. I then tried uncompressing, then compressing the plugin (not changing anything) and the resultant jar file was still bigger than the

Importing Eclipse Plugin source in Eclipse

 ̄綄美尐妖づ 提交于 2020-01-02 18:45:12
问题 I have the source code for the VersionOne plugin. I am wanting to modify the code because I am getting a NullPointerException when I click a specific button on the plugin which crashes eclipse. I was wondering what steps I need to take in eclipse to import the source code, modify it, and get it to run. I have read over how to create a new plugin project, but I have never tried importing a plugin before. Plugin Source 回答1: Once you have imported the project and that seems to work fine, just

Eclipse extension for opening TIFF (type 4) images?

被刻印的时光 ゝ 提交于 2020-01-02 14:29:18
问题 I need to display a TIFF (type 4) image in Eclipse from a Java stream. TIFFv4 is not supported, so I need an image library. Sun's JAI-ImageIO has native code -- I can't wrap it easily into a plugin. I can't just import jai-imageio.jar (et al) from the lib\ext directory because Eclipse has its own ideas about classpaths. Any suggestions for image extensions / libraries usable in Eclipse? Although I've got the same core code compiling and running on the same Eclipse (Galileo) as a standard Java

Add headless capability to existing eclipse plugin

≯℡__Kan透↙ 提交于 2020-01-02 07:57:08
问题 I have an existing Eclipse plugin which run as a regular IDE plugin, receiving commands from the GUI and returning output in custom views. I want to add an ability to also be able to run that plugin in headless mode, with the input received from the command-line and the output going to some file. Is there some way of modifying the existing plugin to support that mode of execution in addition to the existing regular execution , or do I have to create a new headless plugin and just use code