简体   繁体   中英

Eclipse integrating plugin in project

I have a plugin with a view and I tried to integrate it into a project. The problem is that I get the error :

!ENTRY org.eclipse.update.configurator 4 0 2014-08-20 16:17:35.087
!MESSAGE Plugin does not have a valid identifier: plugins/PluginTest.jar

and

!ENTRY org.eclipse.update.configurator 4 0 2014-08-20 16:17:35.088
!MESSAGE Plugin does not have a valid version: plugins/PluginTest.jar

and

!ENTRY org.eclipse.ui 4 0 2014-08-20 16:17:40.138
!MESSAGE Problems occurred restoring workbench.

I copied the .jar file in the eclipse/plugin/ folder. What can be the cause of this errors ?

You should create a Eclipse plugin project using 'File > New > Project.. > Plug-in Project'.

This will prompt you for values such as the plugin id and version and create a META-INF/MANIFEST.MF file containing these values.

在此处输入图片说明

A minimal version of the MANIFEST.MF might look like:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: PluginTest
Bundle-SymbolicName: PluginTest;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8

Other files important for plugins such as the build.properties will also be created and the 'plugin nature' will be added to .project file which makes many plugin specific entries appear in the Project Properties and context menus.

Is the plugin's header right?

Maybe it doesn't have the version on it's header, here is an example:

    Plugin Name: Test Plugin
    Plugin URI: http://testUri
    Description: Testing description
    Author: Us
    Version: 0.1-alpha
    Author URI: http://myProfile
    Text Domain: testing
    Domain Path: /lang

Here is a good link: http://codex.wordpress.org/File_Header

Are you building the plugin or just downloaded it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM