Eclipse development

View: New views
13 Messages — Rating Filter:   Alert me  

Eclipse development

by Wander Grevink :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For those who develop Hippo ECM using eclipse,

I've made some changes to the eclipse documentation that might make life more easy.
See http://docs.onehippo.org/hippo-ecm/SNAPSHOT/building/eclipse.html

The basics remain the same, I've just tried to automate as much steps as possible.

Wander
_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Niels van Kampenhout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wander Grevink wrote:
> For those who develop Hippo ECM using eclipse,
>
> I've made some changes to the eclipse documentation that might make life
> more easy.
> See http://docs.onehippo.org/hippo-ecm/SNAPSHOT/building/eclipse.html
>
> The basics remain the same, I've just tried to automate as much steps as
> possible.

Cool! I will try it out asap.

Just out of interest: can you tell a little bit more about the Groovy
Monkey script?

Niels

_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Niels van Kampenhout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Niels van Kampenhout wrote:

> Wander Grevink wrote:
>> For those who develop Hippo ECM using eclipse,
>>
>> I've made some changes to the eclipse documentation that might make
>> life more easy.
>> See http://docs.onehippo.org/hippo-ecm/SNAPSHOT/building/eclipse.html
>>
>> The basics remain the same, I've just tried to automate as much steps
>> as possible.
>
> Cool! I will try it out asap.

The Groovy Monkey script throws an exception:

exception from Groovy:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed, fixProjects.groovy: 10: unable to resolve class
org.eclipse.jdt.internal.core.SetClasspathOperation
  @ line 10, column 1.fixProjects.groovy: 11: unable to resolve class
org.eclipse.jdt.core.IClasspathEntry
  @ line 11, column 1.fixProjects.groovy: 12: unable to resolve class
org.eclipse.jdt.internal.core.ClasspathEntry
  @ line 12, column 1.fixProjects.groovy: 13: unable to resolve class
org.eclipse.jdt.core.IPackageFragmentRoot
  @ line 13, column 1.fixProjects.groovy: 14: unable to resolve class
org.eclipse.jdt.core.IClasspathAttribute
  @ line 14, column 1.
5 errors

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed, fixProjects.groovy: 10: unable to resolve class
org.eclipse.jdt.internal.core.SetClasspathOperation
  @ line 10, column 1.fixProjects.groovy: 11: unable to resolve class
org.eclipse.jdt.core.IClasspathEntry
  @ line 11, column 1.fixProjects.groovy: 12: unable to resolve class
org.eclipse.jdt.internal.core.ClasspathEntry
  @ line 12, column 1.fixProjects.groovy: 13: unable to resolve class
org.eclipse.jdt.core.IPackageFragmentRoot
  @ line 13, column 1.fixProjects.groovy: 14: unable to resolve class
org.eclipse.jdt.core.IClasspathAttribute
  @ line 14, column 1.
5 errors

        at
org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
        at
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:787)
        at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:438)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:277)
        at groovy.lang.GroovyShell.parseClass(GroovyShell.java:572)
        at groovy.lang.GroovyShell.parse(GroovyShell.java:584)
        at groovy.lang.GroovyShell.parse(GroovyShell.java:564)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:542)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:484)
        at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:95)
        at org.codehaus.groovy.bsf.GroovyEngine.apply(GroovyEngine.java:73)
        at org.apache.bsf.BSFManager$1.run(BSFManager.java:215)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.bsf.BSFManager.apply(BSFManager.java:212)
        at net.sf.groovyMonkey.lang.MonkeyScript.run(MonkeyScript.java:233)
        at net.sf.groovyMonkey.RunMonkeyScript.runScript(RunMonkeyScript.java:236)
        at net.sf.groovyMonkey.RunMonkeyScript.runScript(RunMonkeyScript.java:212)
        at
net.sf.groovyMonkey.RunMonkeyScript$2.runInWorkspace(RunMonkeyScript.java:156)
        at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Wander Grevink :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ai! I was hoping that this would work out of the box for everybody.

I've tried it out on Eclipse 3.4 (both the "Eclipse IDE for Java EE Developers" and the
"Eclipse Classic 3.4" editions) found on http://www.eclipse.org/downloads/

Are you on an older version? if so I would probably have to change the documentation, currently
it says you need Eclipse >= 3.2 (Or maybe I'm doing something wrong since the Groovy Monkey
documentation says it's compatible as far back as 3.1)

---

Groovy Monkey (http://groovy.codehaus.org/Groovy+Monkey) is a "dynamic scripting
tool for the Eclipse Platform that enables you to automate tasks, explore the Eclipse API, etc."

The "Fix Hippo ECM projects" script uses the Eclipse API automate some of the steps that
previously needed to be done by hand: add a project dependency to from package-war to repository-engine etc.

In theory it could be extended to do everything on the 'developing with eclipse' page. The holy grail in
this respect would be a script that starts with an empty workspace, installs plugins, checks out all source code,
creates the projects, adds jetty launch configuration etc. This is definitely possible, the only question is if it is
worth the time it takes to create and maintain such a script, probably not :-)

Wander


Niels van Kampenhout wrote:

> Niels van Kampenhout wrote:
>> Wander Grevink wrote:
>>> For those who develop Hippo ECM using eclipse,
>>>
>>> I've made some changes to the eclipse documentation that might make
>>> life more easy.
>>> See http://docs.onehippo.org/hippo-ecm/SNAPSHOT/building/eclipse.html
>>>
>>> The basics remain the same, I've just tried to automate as much steps
>>> as possible.
>>
>> Cool! I will try it out asap.
>
> The Groovy Monkey script throws an exception:
>
> exception from Groovy:
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed, fixProjects.groovy: 10: unable to resolve class
> org.eclipse.jdt.internal.core.SetClasspathOperation
>  @ line 10, column 1.fixProjects.groovy: 11: unable to resolve class
> org.eclipse.jdt.core.IClasspathEntry
>  @ line 11, column 1.fixProjects.groovy: 12: unable to resolve class
> org.eclipse.jdt.internal.core.ClasspathEntry
>  @ line 12, column 1.fixProjects.groovy: 13: unable to resolve class
> org.eclipse.jdt.core.IPackageFragmentRoot
>  @ line 13, column 1.fixProjects.groovy: 14: unable to resolve class
> org.eclipse.jdt.core.IClasspathAttribute
>  @ line 14, column 1.
> 5 errors
>
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed, fixProjects.groovy: 10: unable to resolve class
> org.eclipse.jdt.internal.core.SetClasspathOperation
>  @ line 10, column 1.fixProjects.groovy: 11: unable to resolve class
> org.eclipse.jdt.core.IClasspathEntry
>  @ line 11, column 1.fixProjects.groovy: 12: unable to resolve class
> org.eclipse.jdt.internal.core.ClasspathEntry
>  @ line 12, column 1.fixProjects.groovy: 13: unable to resolve class
> org.eclipse.jdt.core.IPackageFragmentRoot
>  @ line 13, column 1.fixProjects.groovy: 14: unable to resolve class
> org.eclipse.jdt.core.IClasspathAttribute
>  @ line 14, column 1.
> 5 errors
>
>     at
> org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
>
>     at
> org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:787)
>
>     at
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:438)
>
>     at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:277)
>     at groovy.lang.GroovyShell.parseClass(GroovyShell.java:572)
>     at groovy.lang.GroovyShell.parse(GroovyShell.java:584)
>     at groovy.lang.GroovyShell.parse(GroovyShell.java:564)
>     at groovy.lang.GroovyShell.evaluate(GroovyShell.java:542)
>     at groovy.lang.GroovyShell.evaluate(GroovyShell.java:484)
>     at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:95)
>     at org.codehaus.groovy.bsf.GroovyEngine.apply(GroovyEngine.java:73)
>     at org.apache.bsf.BSFManager$1.run(BSFManager.java:215)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at org.apache.bsf.BSFManager.apply(BSFManager.java:212)
>     at net.sf.groovyMonkey.lang.MonkeyScript.run(MonkeyScript.java:233)
>     at
> net.sf.groovyMonkey.RunMonkeyScript.runScript(RunMonkeyScript.java:236)
>     at
> net.sf.groovyMonkey.RunMonkeyScript.runScript(RunMonkeyScript.java:212)
>     at
> net.sf.groovyMonkey.RunMonkeyScript$2.runInWorkspace(RunMonkeyScript.java:156)
>
>     at
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
>
>     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
> _______________________________________________
> HippoRepos-dev mailing list
> HippoRepos-dev@...
> http://lists.hippo.nl/mailman/listinfo/hipporepos-dev
_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Niels van Kampenhout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wander Grevink wrote:

> Ai! I was hoping that this would work out of the box for everybody.
>
> I've tried it out on Eclipse 3.4 (both the "Eclipse IDE for Java EE
> Developers" and the
> "Eclipse Classic 3.4" editions) found on http://www.eclipse.org/downloads/
>
> Are you on an older version? if so I would probably have to change the
> documentation, currently
> it says you need Eclipse >= 3.2 (Or maybe I'm doing something wrong
> since the Groovy Monkey
> documentation says it's compatible as far back as 3.1)

Version: 3.3.2
Build id: M20080221-1800

I think I have the "classic" distribution.

_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Wander Grevink :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Do you have the time to verify it on 3.4?
I've just done it again, started with a fresh eclipse and a fresh workspace and it worked without problems.

Wander

Niels van Kampenhout wrote:

> Wander Grevink wrote:
>> Ai! I was hoping that this would work out of the box for everybody.
>>
>> I've tried it out on Eclipse 3.4 (both the "Eclipse IDE for Java EE
>> Developers" and the
>> "Eclipse Classic 3.4" editions) found on
>> http://www.eclipse.org/downloads/
>>
>> Are you on an older version? if so I would probably have to change the
>> documentation, currently
>> it says you need Eclipse >= 3.2 (Or maybe I'm doing something wrong
>> since the Groovy Monkey
>> documentation says it's compatible as far back as 3.1)
>
> Version: 3.3.2
> Build id: M20080221-1800
>
> I think I have the "classic" distribution.
>
> _______________________________________________
> HippoRepos-dev mailing list
> HippoRepos-dev@...
> http://lists.hippo.nl/mailman/listinfo/hipporepos-dev
_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Wander Grevink :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Another difference of course is the Windows/Linux thing. But I cannot imagine that that
plays a role here. But anyway, just to make sure, there is one experiment you could do and that
is editing the script (Groovy Monkey -> Edit Script -> Fix Hippo ECM projects) and removing
the 'Script-Path' line in the comment block. It contains forward slashes and is AFAIK not strictly
necessary.

Wander

Wander Grevink wrote:

> Do you have the time to verify it on 3.4?
> I've just done it again, started with a fresh eclipse and a fresh
> workspace and it worked without problems.
>
> Wander
>
> Niels van Kampenhout wrote:
>> Wander Grevink wrote:
>>> Ai! I was hoping that this would work out of the box for everybody.
>>>
>>> I've tried it out on Eclipse 3.4 (both the "Eclipse IDE for Java EE
>>> Developers" and the
>>> "Eclipse Classic 3.4" editions) found on
>>> http://www.eclipse.org/downloads/
>>>
>>> Are you on an older version? if so I would probably have to change
>>> the documentation, currently
>>> it says you need Eclipse >= 3.2 (Or maybe I'm doing something wrong
>>> since the Groovy Monkey
>>> documentation says it's compatible as far back as 3.1)
>>
>> Version: 3.3.2
>> Build id: M20080221-1800
>>
>> I think I have the "classic" distribution.
>>
>> _______________________________________________
>> HippoRepos-dev mailing list
>> HippoRepos-dev@...
>> http://lists.hippo.nl/mailman/listinfo/hipporepos-dev
> _______________________________________________
> HippoRepos-dev mailing list
> HippoRepos-dev@...
> http://lists.hippo.nl/mailman/listinfo/hipporepos-dev
_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Niels van Kampenhout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wander Grevink wrote:
> Another difference of course is the Windows/Linux thing. But I cannot
> imagine that that
> plays a role here. But anyway, just to make sure, there is one
> experiment you could do and that
> is editing the script (Groovy Monkey -> Edit Script -> Fix Hippo ECM
> projects) and removing
> the 'Script-Path' line in the comment block. It contains forward slashes
> and is AFAIK not strictly
> necessary.

FYI I am on Linux (Ubuntu 8.04).

"Groovy Monkey -> Edit Script -> Fix Hippo ECM projects" does not do
anything for me (I have the menu option but nothing happens when I click
on it...).

_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

RE: Eclipse development

by Wander Grevink-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, maybe your Groovy Monkey plugin is broken, try the following:
1> Copy the script below to your clipboard (including the Jabberwocky-inspired markers at the beginning and ending of the script)
2> In Eclipse: Groovy Monkey -> Paste New Script
3> Open a (any) text file, select some text and run the 'Alter Case' script from the Groovy menu

=> Does this work?


--- Came wiffling through the eclipsey wood ---
/*
 * Menu: Alter Case
 * Kudos: Wander
 * License: Apache 2.0
 * Job: UIJob
 * Exec-Mode: Foreground
 * DOM: http://groovy-monkey.sourceforge.net/update/plugins/net.sf.groovyMonkey.dom
 */

// This is an example of altering text in Eclipse using the Groovy Monkey

def editor = window.activePage.activeEditor
def source = editor.sourceViewer.document

// To get all of the text: source.get()
def range = window.activePage.selection

// If no text is actually selected, range.length=0,
// but range.offset is the cursor position
def text = source.get( range.offset, range.length )

if ( text =~ /^[A-Z]/ )
        text = text.toLowerCase()
else
        text = text.toUpperCase()
       
// The replace method will replace the selected text...
source.replace(range.offset, range.length, text );

--- And burbled as it ran! ---


-----Original Message-----
From: hipporepos-dev-bounces@... on behalf of Niels van Kampenhout
Sent: Tue 7/22/2008 4:43 PM
To: Hippo Repository development public mailinglist
Subject: Re: [HippoRepos-dev] Eclipse  development
 
Wander Grevink wrote:
> Another difference of course is the Windows/Linux thing. But I cannot
> imagine that that
> plays a role here. But anyway, just to make sure, there is one
> experiment you could do and that
> is editing the script (Groovy Monkey -> Edit Script -> Fix Hippo ECM
> projects) and removing
> the 'Script-Path' line in the comment block. It contains forward slashes
> and is AFAIK not strictly
> necessary.

FYI I am on Linux (Ubuntu 8.04).

"Groovy Monkey -> Edit Script -> Fix Hippo ECM projects" does not do
anything for me (I have the menu option but nothing happens when I click
on it...).

_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev



_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

winmail.dat (5K) Download Attachment

Re: Eclipse development

by Niels van Kampenhout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wander Grevink wrote:
> OK, maybe your Groovy Monkey plugin is broken, try the following:
> 1> Copy the script below to your clipboard (including the
> Jabberwocky-inspired markers at the beginning and ending of the script)
>
> 2> In Eclipse: Groovy Monkey -> Paste New Script
> 3> Open a (any) text file, select some text and run the 'Alter Case'
> script from the Groovy menu
>
> => Does this work?

Yes that works....

_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Wander Grevink :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The ClassNotFoundException you get when running the script is an Eclipse class that the script explicitly imports.
Apparently this class is not available in your Eclipse installation, why I don't know.

I've sucesssfully tested the script with a number of clean Eclipse installations:
* eclipse-java-ganymede-linux-gtk.tar.gz
* eclipse-jee-ganymede-linux-gtk.tar.gz
* eclipse-SDK-3.4-linux-gtk.tar.gz
* eclipse-SDK-3.3.2-linux-gtk.tar.gz

The script failed on this one:
* eclipse-SDK-3.2.2-linux-gtk.tar.gz

I'll update the documentation that you need Eclipse >= 3.3

Wander

Niels van Kampenhout wrote:

> Wander Grevink wrote:
>> OK, maybe your Groovy Monkey plugin is broken, try the following:
>> 1> Copy the script below to your clipboard (including the
>> Jabberwocky-inspired markers at the beginning and ending of the script)
>>
>> 2> In Eclipse: Groovy Monkey -> Paste New Script
>> 3> Open a (any) text file, select some text and run the 'Alter Case'
>> script from the Groovy menu
>>
>> => Does this work?
>
> Yes that works....
>
> _______________________________________________
> HippoRepos-dev mailing list
> HippoRepos-dev@...
> http://lists.hippo.nl/mailman/listinfo/hipporepos-dev
_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Niels van Kampenhout :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wander Grevink wrote:

> The ClassNotFoundException you get when running the script is an Eclipse
> class that the script explicitly imports.
> Apparently this class is not available in your Eclipse installation, why
> I don't know.
>
> I've sucesssfully tested the script with a number of clean Eclipse
> installations:
> * eclipse-java-ganymede-linux-gtk.tar.gz
> * eclipse-jee-ganymede-linux-gtk.tar.gz
> * eclipse-SDK-3.4-linux-gtk.tar.gz
> * eclipse-SDK-3.3.2-linux-gtk.tar.gz
>
> The script failed on this one:
> * eclipse-SDK-3.2.2-linux-gtk.tar.gz

So it worked on 3.3.2 for you? Then my installation is probably corrupted :(

_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev

Re: Eclipse development

by Wander Grevink :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Niels van Kampenhout wrote:

> Wander Grevink wrote:
>> The ClassNotFoundException you get when running the script is an
>> Eclipse class that the script explicitly imports.
>> Apparently this class is not available in your Eclipse installation,
>> why I don't know.
>>
>> I've sucesssfully tested the script with a number of clean Eclipse
>> installations:
>> * eclipse-java-ganymede-linux-gtk.tar.gz
>> * eclipse-jee-ganymede-linux-gtk.tar.gz
>> * eclipse-SDK-3.4-linux-gtk.tar.gz
>> * eclipse-SDK-3.3.2-linux-gtk.tar.gz
>>
>> The script failed on this one:
>> * eclipse-SDK-3.2.2-linux-gtk.tar.gz
>
> So it worked on 3.3.2 for you? Then my installation is probably
> corrupted :(
>

Sad but true,
The good news is that this is a good excuse for you to try out Eclipse 3.4 :-)

W
_______________________________________________
HippoRepos-dev mailing list
HippoRepos-dev@...
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev
LightInTheBox - Buy quality products at wholesale price!