You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Greg Brown <gk...@mac.com> on 2010/07/23 19:44:45 UTC

Eclipse plugin

Hi all,

I just uploaded an Eclipse plugin for launching Pivot applications to the wiki:

https://cwiki.apache.org/confluence/display/PIVOT/Platform+Developer+Info

This plugin allows you to launch either a Java class that implements the Application interface or a BXML file that contains a Window via a right-click menu. It should make launching Pivot applications from within Eclipse a bit more convenient. Hope you find it useful.

G


Re: Eclipse plugin

Posted by Greg Brown <gk...@mac.com>.
> 1) Firstly, should the plugin be tracked through JIRA

Yes, it probably should.

> If so, does it need its own value for the JIRA 'Component/s' list   (such as
> 'eclipse' or 'eclipse-plugin')

Yes.

> 2) Is it worth adding in some logic to the plugin that attempts to supply
> the   --resources  argument to org.apache.pivot.wtk.ScriptApplication?

I had thought about that but couldn't come up with a good solution. I hadn't thought of this, though:

> - handle the missing file(s) by just showing the "%message" string from the
> BXML file.

This seems like a reasonable solution. Instead of throwing on line 1013 in BXMLSerializer, we could simply set the attribute value to the unresolved string. This is consistent with what we do on lines 1019 - 1021.


Re: Eclipse plugin

Posted by Chris Bartlett <cb...@gmail.com>.
I just tried using the plugin to launch
/pivot-trunk/demos/src/org/apache/pivot/demos/roweditor/row_editor_demo.bxml

but it fails because it doesn't know what resource file(s) to use.

An error occurred at line number 23 in file
/E:/Workspaces/pivot-trunk/pivot-trunk/bin/org/apache/pivot/demos/roweditor/row_editor_demo.bxml:
java.lang.IllegalStateException: Resource bundle is undefined.
at
org.apache.pivot.beans.BXMLSerializer.processAttributes(BXMLSerializer.java:1014)
at
org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:795)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:431)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:610)
at org.apache.pivot.wtk.ScriptApplication.startup(ScriptApplication.java:74)
at
org.apache.pivot.wtk.DesktopApplicationContext.main(DesktopApplicationContext.java:616)


1) Firstly, should the plugin be tracked through JIRA or is it an
unsupported tool?
If so, does it need its own value for the JIRA 'Component/s' list   (such as
'eclipse' or 'eclipse-plugin')


2) Is it worth adding in some logic to the plugin that attempts to supply
the   --resources  argument to org.apache.pivot.wtk.ScriptApplication?
This could be based on some simple rules & file naming conventions
--src=/org/apache/pivot/demos/roweditor/row_editor_demo.bxml
becomes
--resources=org/apache/pivot/demos/roweditor/RowEditorDemo

or merely a dumb/brute force scan of *.json files (without the locale
suffixes) might suffice


Other options might be
- to display a dialog and allow the user to browse the filesystem to add
resource files if the bxml file is localized.  ScriptApplication could catch
the exception and then show the dialog.
- handle the missing file(s) by just showing the "%message" string from the
BXML file.


Regards,

Chris

Re: Eclipse plugin

Posted by Sandro Martini <sa...@gmail.com>.
Hi to all,
simply copying it in the dropins folder (eclipse-3.5.2 both for 32 bit and
64 bit) for me works.
If I remember well, "simple" Eclipse plugins should be copied there.

I've tried also the same with an eclipse-3.6.0 but I haven't tried if it's
enabled (I haven't Pivot applications there at the moment), but at least
also in this case it don't makes damages on eclipse :-) 

Bye,
Sandro

-- 
View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/Eclipse-plugin-tp990401p1085727.html
Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.

Re: Eclipse plugin

Posted by Chris Bartlett <cb...@gmail.com>.
Upgrading to Eclipse 3.5.2 via the internal Help -> Check For Updates
worked.
It shows in the plug-in info page, and the context menus show up as
described in your earlier reply.

That was the first thing I tried, so can't give any hints as to whether is
works OK for pre-3.5.1 versions of Eclipse.

(And a very pretty icon it is, too!)

Chris

On Tue, Aug 10, 2010 at 8:21 PM, Greg Brown <gk...@mac.com> wrote:

> That may help. I'm using Eclipse 3.5.2.
>
> To use the plugin, just right-click on any class that implements
> org.apache.pivot.wtk.Application or any BXML file that has a Window (or
> subclass) as a root element and select "Run As" or "Debug As" from the
> context menu. You should see an option to launch the application as a "Pivot
> Application" or a "Pivot Script Application", respectively. Both menu
> options should have a pretty Pivot icon next to them.  :-)
>
>
> On Aug 10, 2010, at 8:58 AM, Chris Bartlett wrote:
>
> > No, I can't see it.
> > I'll try on a different PC and with a new, clean install of the latest
> > Eclipse if that fails,
> >
> > Chris
> >
> >
> > On Tue, Aug 10, 2010 at 7:49 PM, Greg Brown <gk...@mac.com> wrote:
> >
> >> Putting it in the plugins directory should be sufficient. When I open
> the
> >> Plug-ins tab in the SDK About dialog, I see it listed as:
> >>
> >> Provider: Apache Software Foundation
> >> Plug-in Name: Eclipse Plugin for Apache Pivot
> >> Version: 2.0
> >> Plug-in Id: org.apache.pivot.eclipse
> >>
> >> Does this line not appear for you?
> >>
> >> On Aug 10, 2010, at 8:38 AM, Chris Bartlett wrote:
> >>
> >>> Greg,
> >>>
> >>> Can you please supply some brief install/usage notes?
> >>>
> >>> I tried dropping the jar into my
> >>> <eclipse-install-dir>\plugins and
> >>> <eclipse-install-dir>\dropins directories,
> >>> but couldn't see any reference to it when looking under    Help ->
> About
> >>> Eclipse SDK -> Installation Details -> Plug-ins
> >>>
> >>> I tried starting Eclipse with the -clean command line option, but to no
> >>> avail.
> >>>
> >>> (Eclipse 3.5.1 on Windows XP x64 with Sun JRE 1.6.0_19-b04)
> >>>
> >>> Chris
> >>>
> >>> On Sat, Jul 24, 2010 at 12:44 AM, Greg Brown <gk...@mac.com> wrote:
> >>>
> >>>> Hi all,
> >>>>
> >>>> I just uploaded an Eclipse plugin for launching Pivot applications to
> >> the
> >>>> wiki:
> >>>>
> >>>>
> >>
> https://cwiki.apache.org/confluence/display/PIVOT/Platform+Developer+Info
> >>>>
> >>>> This plugin allows you to launch either a Java class that implements
> the
> >>>> Application interface or a BXML file that contains a Window via a
> >>>> right-click menu. It should make launching Pivot applications from
> >> within
> >>>> Eclipse a bit more convenient. Hope you find it useful.
> >>>>
> >>>> G
> >>>>
> >>>>
> >>
> >>
>
>

Re: Eclipse plugin

Posted by Greg Brown <gk...@mac.com>.
That may help. I'm using Eclipse 3.5.2.

To use the plugin, just right-click on any class that implements org.apache.pivot.wtk.Application or any BXML file that has a Window (or subclass) as a root element and select "Run As" or "Debug As" from the context menu. You should see an option to launch the application as a "Pivot Application" or a "Pivot Script Application", respectively. Both menu options should have a pretty Pivot icon next to them.  :-)


On Aug 10, 2010, at 8:58 AM, Chris Bartlett wrote:

> No, I can't see it.
> I'll try on a different PC and with a new, clean install of the latest
> Eclipse if that fails,
> 
> Chris
> 
> 
> On Tue, Aug 10, 2010 at 7:49 PM, Greg Brown <gk...@mac.com> wrote:
> 
>> Putting it in the plugins directory should be sufficient. When I open the
>> Plug-ins tab in the SDK About dialog, I see it listed as:
>> 
>> Provider: Apache Software Foundation
>> Plug-in Name: Eclipse Plugin for Apache Pivot
>> Version: 2.0
>> Plug-in Id: org.apache.pivot.eclipse
>> 
>> Does this line not appear for you?
>> 
>> On Aug 10, 2010, at 8:38 AM, Chris Bartlett wrote:
>> 
>>> Greg,
>>> 
>>> Can you please supply some brief install/usage notes?
>>> 
>>> I tried dropping the jar into my
>>> <eclipse-install-dir>\plugins and
>>> <eclipse-install-dir>\dropins directories,
>>> but couldn't see any reference to it when looking under    Help -> About
>>> Eclipse SDK -> Installation Details -> Plug-ins
>>> 
>>> I tried starting Eclipse with the -clean command line option, but to no
>>> avail.
>>> 
>>> (Eclipse 3.5.1 on Windows XP x64 with Sun JRE 1.6.0_19-b04)
>>> 
>>> Chris
>>> 
>>> On Sat, Jul 24, 2010 at 12:44 AM, Greg Brown <gk...@mac.com> wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> I just uploaded an Eclipse plugin for launching Pivot applications to
>> the
>>>> wiki:
>>>> 
>>>> 
>> https://cwiki.apache.org/confluence/display/PIVOT/Platform+Developer+Info
>>>> 
>>>> This plugin allows you to launch either a Java class that implements the
>>>> Application interface or a BXML file that contains a Window via a
>>>> right-click menu. It should make launching Pivot applications from
>> within
>>>> Eclipse a bit more convenient. Hope you find it useful.
>>>> 
>>>> G
>>>> 
>>>> 
>> 
>> 


Re: Eclipse plugin

Posted by Chris Bartlett <cb...@gmail.com>.
No, I can't see it.
I'll try on a different PC and with a new, clean install of the latest
Eclipse if that fails,

Chris


On Tue, Aug 10, 2010 at 7:49 PM, Greg Brown <gk...@mac.com> wrote:

> Putting it in the plugins directory should be sufficient. When I open the
> Plug-ins tab in the SDK About dialog, I see it listed as:
>
> Provider: Apache Software Foundation
> Plug-in Name: Eclipse Plugin for Apache Pivot
> Version: 2.0
> Plug-in Id: org.apache.pivot.eclipse
>
> Does this line not appear for you?
>
> On Aug 10, 2010, at 8:38 AM, Chris Bartlett wrote:
>
> > Greg,
> >
> > Can you please supply some brief install/usage notes?
> >
> > I tried dropping the jar into my
> > <eclipse-install-dir>\plugins and
> > <eclipse-install-dir>\dropins directories,
> > but couldn't see any reference to it when looking under    Help -> About
> > Eclipse SDK -> Installation Details -> Plug-ins
> >
> > I tried starting Eclipse with the -clean command line option, but to no
> > avail.
> >
> > (Eclipse 3.5.1 on Windows XP x64 with Sun JRE 1.6.0_19-b04)
> >
> > Chris
> >
> > On Sat, Jul 24, 2010 at 12:44 AM, Greg Brown <gk...@mac.com> wrote:
> >
> >> Hi all,
> >>
> >> I just uploaded an Eclipse plugin for launching Pivot applications to
> the
> >> wiki:
> >>
> >>
> https://cwiki.apache.org/confluence/display/PIVOT/Platform+Developer+Info
> >>
> >> This plugin allows you to launch either a Java class that implements the
> >> Application interface or a BXML file that contains a Window via a
> >> right-click menu. It should make launching Pivot applications from
> within
> >> Eclipse a bit more convenient. Hope you find it useful.
> >>
> >> G
> >>
> >>
>
>

Re: Eclipse plugin

Posted by Greg Brown <gk...@mac.com>.
Putting it in the plugins directory should be sufficient. When I open the Plug-ins tab in the SDK About dialog, I see it listed as:

Provider: Apache Software Foundation
Plug-in Name: Eclipse Plugin for Apache Pivot
Version: 2.0
Plug-in Id: org.apache.pivot.eclipse

Does this line not appear for you?

On Aug 10, 2010, at 8:38 AM, Chris Bartlett wrote:

> Greg,
> 
> Can you please supply some brief install/usage notes?
> 
> I tried dropping the jar into my
> <eclipse-install-dir>\plugins and
> <eclipse-install-dir>\dropins directories,
> but couldn't see any reference to it when looking under    Help -> About
> Eclipse SDK -> Installation Details -> Plug-ins
> 
> I tried starting Eclipse with the -clean command line option, but to no
> avail.
> 
> (Eclipse 3.5.1 on Windows XP x64 with Sun JRE 1.6.0_19-b04)
> 
> Chris
> 
> On Sat, Jul 24, 2010 at 12:44 AM, Greg Brown <gk...@mac.com> wrote:
> 
>> Hi all,
>> 
>> I just uploaded an Eclipse plugin for launching Pivot applications to the
>> wiki:
>> 
>> https://cwiki.apache.org/confluence/display/PIVOT/Platform+Developer+Info
>> 
>> This plugin allows you to launch either a Java class that implements the
>> Application interface or a BXML file that contains a Window via a
>> right-click menu. It should make launching Pivot applications from within
>> Eclipse a bit more convenient. Hope you find it useful.
>> 
>> G
>> 
>> 


Re: Eclipse plugin

Posted by Chris Bartlett <cb...@gmail.com>.
Greg,

Can you please supply some brief install/usage notes?

I tried dropping the jar into my
<eclipse-install-dir>\plugins and
<eclipse-install-dir>\dropins directories,
but couldn't see any reference to it when looking under    Help -> About
Eclipse SDK -> Installation Details -> Plug-ins

I tried starting Eclipse with the -clean command line option, but to no
avail.

(Eclipse 3.5.1 on Windows XP x64 with Sun JRE 1.6.0_19-b04)

Chris

On Sat, Jul 24, 2010 at 12:44 AM, Greg Brown <gk...@mac.com> wrote:

> Hi all,
>
> I just uploaded an Eclipse plugin for launching Pivot applications to the
> wiki:
>
> https://cwiki.apache.org/confluence/display/PIVOT/Platform+Developer+Info
>
> This plugin allows you to launch either a Java class that implements the
> Application interface or a BXML file that contains a Window via a
> right-click menu. It should make launching Pivot applications from within
> Eclipse a bit more convenient. Hope you find it useful.
>
> G
>
>