facebook

Automated workbench IDE layout via workspace task

  1. Secure Delivery Center
  2.  > 
  3. Getting Help
Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #329175 Reply

    sdc-support
    Member

    We have received an email from a user with this problem:

    “Hello,
    I have a problem configuring workspace using .wrkspc workspace tasks (http://www.genuitec.com/sdc/docs/sdc_admin.html#package_configuration_workspace).

    One of the things that I’d like to configure is Eclipse workbench layout, defined by the ${WORKSPACE} \.metadata\.plugins\org.eclipse.ui.workbench\workbench.xml
    I’ve created a workspace task and added it to the Environment Policy workspace tasks list in Admin console.
    All changes are properly commited & promoted, but SDC doesn’t apply settings.

    I’ve tried to update an existing installation and installing Eclipse & workspace from scratch – doesn’t work in both cases.”

    As this sounds like something that may benefit all, we are moving the request over here so everyone can benefit in the details.

    #329178 Reply

    sdc-support
    Member

    The problem here is that eclipse reads and writes the workbench.xml file on start up and shutdown, and as the workspace task are being applied after the workbench have been created the preferences described on the workspace task are never applied and they get overridden by eclipse defaults.

    To fix this we created a .class style workspace task that force eclipse to apply the layout settings described on the workbench.xml file. You just need to add the workspace task with your workbench settings fallowed by the .class style workspace task provided by us. Unfortunately this fix will only work on Eclipse 3.x since elcipse 4.x dosn’t use the workbench.xml file anymore.

    You can find a .zip as an attachment with the .class style task, an .wrkspc task file with the workbench layout settings and a readme file with detailed instructions to set it up.

    Updated (january 2013):
    The zip example have been updated with a new RestoreWorkbenchTask.class file. This is because there was an ordering issue in SDC that could sometimes impact ordering of workspace task application.

    Best Regards.
    Héctor – Pulse Support.

    Attachments:
    You must be logged in to view attached files.
    #329198 Reply

    Pavel
    Member

    It works great!
    Thank you very much for you help!

    #329259 Reply

    sdc-support
    Member

    Hello Pavel.

    I’m glad to know that it’s working for you. Thank you for using SDC.

    Best Regards.
    Héctor – Pulse Support

    #329556 Reply

    Pavel
    Member

    Current version of class task re-applies Eclipse workbench each time I promoting any change from SDC Admin, what is a little bit annoying for users.
    Is it possible to change the class task in order to only re-apply worbench layout when new version of layout xml file is promoted?

    #329604 Reply

    sdc-support
    Member

    Hello Pavel.

    Do you have a reproducible flow? And also, do you see anything odd on the logs? We are investigating in our side too.

    Best Regards.
    Héctor – Pulse Support

    #329610 Reply

    sdc-support
    Member

    Hello again Pavel.

    We reproduced the issue and we fixed it. You can download the attachment in the second comment, I updated it with the new one. In this new one we make sure the layout only gets applied once per workspace.

    Please let us know if you still see any issue.

    Best Regards.
    Héctor – Pulse Support

    #329718 Reply

    Pavel
    Member

    Thank you very much. I’ve tried the new version and it re-applies the workbench layout only when it’s necessary.

    #329736 Reply

    sdc-support
    Member

    Excellent. Thanks for the feedback!

    Cheers,
    Jed Anderson
    SDC Support

    #331859 Reply

    tzman
    Member

    I have tried using this and receive a warning that says “The configuration file RestoreWorkbenchTask.class is unrecognized. Please make sure you have enabled appropriate task support in the installation.” How do I enable Class Task support?

    If I continue on, the install works but never completes the configure workspace task.

    Thanks in advance.

    #331861 Reply

    sdc-support
    Member

    Hello tzman.

    Regarding the warning message you get about the configuration file not being recognized you can ignore it, SDC Update 2 doesn’t recognize class type workspace task but they do work fine on the package installation, in our next release the admin console does recognize them and mark them as “class type workspace tasks” instead of showing that message.

    Now, when you install the package, why do you say is doesn’t work?, do you get any exception?, what are you seeing.

    Best Regards.
    Héctor – SDC Support

    #331864 Reply

    tzman
    Member

    The Install completes successfully.
    The MyEclipse starts with a dialogues that says
    Setup Workspace
    Workspace configuration needs to be applied…

    After clicking Start Now, it changes to
    Configuring Workspace…

    After a couple seconds the main window (IDE editor) disappears and the Progess Information window is left.
    It is Saving workbench state and the task Configuring Workspace is partially started.

    The dialogue isnt locked up, but the progress doesnt move, even after 20 minutes. I have to kill it in task manager.

    Is there something else I can look at to see the issue?

    The following log messages were found in the workspace.

    !ENTRY com.genuitec.eclipse.wizards 1 0 2012-10-31 12:48:46.694
    !MESSAGE Installed snippet library: L:\Programs\MyEclipse\BHM Dev\configuration\org.eclipse.osgi\bundles\101\1\.cp\snippets\jsp\struts_tiles_snippets.xml

    !ENTRY com.genuitec.pulse.client.delivery.package.runtime 4 0 2012-10-31 12:48:48.636
    !MESSAGE Could not read arbitrary workspace path for L:\Programs\MyEclipse\BHM Dev\configuration\com.genuitec.pulse.client.delivery.package.runtime\current\workspace\workbench.xml.wrkspc

    !ENTRY com.google.eclipse.mechanic 1 0 2012-10-31 12:48:48.644
    !MESSAGE GSDC: Workbench layout has not yet been activated.

    !ENTRY org.eclipse.osgi 2 0 2012-10-31 12:49:25.330
    !MESSAGE While loading class “org.eclipse.wst.jsdt.internal.core.JavaModelManager$16”, thread “Thread[Worker-0,5,main]” timed out waiting (5001ms) for thread “Thread[main,6,main]” to finish starting bundle “org.eclipse.wst.jsdt.core_1.1.100.me201207241813 [923]”. To avoid deadlock, thread “Thread[Worker-0,5,main]” is proceeding but “org.eclipse.wst.jsdt.internal.core.JavaModelManager$16” may not be fully initialized.
    !STACK 0
    org.osgi.framework.BundleException: State change in progress for bundle “reference:file:plugins/org.eclipse.wst.jsdt.core_1.1.100.me201207241813.jar” by thread “main”.
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1087)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:297)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at org.eclipse.wst.jsdt.internal.core.JavaModelManager$15.run(JavaModelManager.java:4182)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
    … 16 more
    Root exception:
    org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1087)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:297)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at org.eclipse.wst.jsdt.internal.core.JavaModelManager$15.run(JavaModelManager.java:4182)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

    #331869 Reply

    sdc-support
    Member

    Hello tzman.

    What myEclipse version are you testing this? This workspace task file was a custom request from a client, and it only work for Eclipse 3.x, it have never been tested on MyEclipse. But if you really need this feature we can help you with that.

    Best Regards.
    Héctor – SDC Support

    #331872 Reply

    tzman
    Member

    I am testing with MyEclipse Pro 10.6

    Thanks much for your help!

    #331889 Reply

    sdc-support
    Member

    Hello tzman.

    Can you please send my the workbench.xml.wrkspc file you are using. Please send it to hector(at)genuitec.com

    Best Regards.
    Héctor – SDC Support

Viewing 15 posts - 1 through 15 (of 19 total)
Reply To: Automated workbench IDE layout via workspace task

You must be logged in to post in the forum log in