Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [pde-dev] executing vs. exporting of plugins


Hi,

 and thank you for the precise answer! I solved my problem yesterday at late hours. I'm not exactly sure what changes has affected it enough to make it error free so I will describe the situation at best I can.

My plugin's build.properties file was made from another plugin of mine with of course changes to adapt it to this case. I doubt the error came from there especially since some piece of code present in both plugins ran in one but not in the other. Here's the code in question:

{
..
  ..
        MessageConsole myConsole = findConsole("SSH tunnel Console");
        out = myConsole.newMessageStream();
        out.println("Lauching SSH Tunnel Application\n\n");
  ..
..
}

    private MessageConsole findConsole(String name) {
          ConsolePlugin plugin = ConsolePlugin.getDefault();
          IConsoleManager conMan = plugin.getConsoleManager();
          IConsole[] existing = conMan.getConsoles();
          for (int i = 0; i < existing.length; i++)
             if (name.equals(existing[i].getName()))
                return (MessageConsole) existing[i];
          //no console found, so create a new one
          MessageConsole myConsole = new MessageConsole(name, null);
          conMan.addConsoles(new IConsole[]{myConsole});
          return myConsole;
    }

In order to access the different required packages I added the necessary plugins to the dependencies:

Require-Bundle: org.eclipse.core.runtime,
 org.eclipse.ui.console,
 org.eclipse.ui


This part is the same for both plugins and this is the reason why I posted this issue. In fact, I added this code for debug purpose in order to track the other errors I described in my previous post. It resulted in a "classdef not found" error which I took as similar to my original error though it was "silent" as it did not return an error but merely a wrong behavior.

The error finally disappeared when I decided to rename my plugin Id in the  overview page of the plugin.xml file. I originally named the plugin "cbc.xlsk.TDE.CRun" though the project in which I work has a different name. I renamed the id of the plugin by replacing the dots "." by underscores "_".

Everything was sorted after doing so... I don't really understand why it would be a problem in my case especially since all the plugins I use have such nomenclatures. Would it be the difference of name between the project and plugin id? This seems very unlikely though...

Anyways, my week's struggle is now over! Still, thank you for the details as it helps understanding the building of plugins!

Best regards,

Patrick Juhl




To: pde-dev@xxxxxxxxxxx
CC: pde-dev@xxxxxxxxxxx; pde-dev-bounces@xxxxxxxxxxx
Subject: Re: [pde-dev] executing vs. exporting of plugins
From: baumanbr@xxxxxxxxxx
Date: Mon, 10 Dec 2007 12:00:55 -0600


Hi Patrick,

This has been a tricky point for new PDE developers.  If the plug-in is executing correctly, you are almost there.  The most common culprit for a difference in behavior is something is not included which is needed to run the plug-in.  The file responsible for enumerating files/folders to be included is the "build.properties" of your project.  


When you open that file, look for a tag called bin.includes.  This tag contains all the resources (existing or which are built dynamically) that will be included during the export process.  Different files are necessary for more complex plug-ins, but for a basic plugin you should make sure these files are included:

plugin.xml
META-INF/
plugin.properties (if it exists)
<library name>

Now by default, the library name for a PDE project is ".".  If you changed the default, then please make sure your library name is included.  Libraries are created dynamically, so we have to make sure the library has the right source.  Look for a "source.<library name>" entry in the build.properties (by default this tag will be "source..").  Make sure the value of this tag is the source folder where you source code is located.

If you do not find a problem with the above information, go ahead and post the contents of your build.properties and the value for Bundle-Classpath in your Manifest (if it exists).

Brian Bauman
    IBM Software Group - Austin, TX
    Eclipse Committer
    baumanbr@xxxxxxxxxx
    (512) 838 -2938 (T/L 678-2938)



From: Patrick Juhl <wannabag@xxxxxxxxxxx>
To: <pde-dev@xxxxxxxxxxx>
Date: 12/10/2007 01:02 AM
Subject: [pde-dev] executing vs. exporting of plugins





Hi all,

The issue I have concerns the difference of behavior between an exported plugin and executing it as an Eclipse application.

The plugin I am developing depends on various other plugins from which I use some classes in my code (the plugins are from the Remote System Explorer project). My plugin works fine when executing it. The problem is after exporting it, the plugin does not act the same although I get no errors whatsoever. What is the difference between execution and exporting when depending on other plugins? How can I make sure these dependencies are fulfilled when starting Eclipse?

short description of the behavior:

      -RSE provides a remote system explorer view from which one may browse through remote system and perform basic action on remote files. My plugins extends this view by adding a popup menu when selecting a remote file with a specific name.
      -The idea then is that my plugin should open some configurations files situated on the remote system in an editor. In the background, this file is downloaded and kept in a temporary local directory.
      -After the configuration is done and when clicking "save", the modified file should be saved locally and remotely.
     
This all works fine when executing the plugin. When using the exported version on the other hand, the last step changes, and the file is not saved remotely but only locally.

Can anyone help me with this?

Best regards,

Patrick Juhl






Partagez une tonne de photos en un instant avec qui vous voulez ! Windows Live Spaces_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev



ArrĂȘtez le ping pong, et recevez votre rĂ©ponse dans la seconde ! Windows Live Messenger

Back to the top