[jira] [Updated] (PIVOT-746) Add API to return Version of Pivot retrieved from "build.properties"

2011-05-24 Thread Roger Whitcomb (JIRA)

 [ 
https://issues.apache.org/jira/browse/PIVOT-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roger Whitcomb updated PIVOT-746:
-

Attachment: version2.patch

Patch to use Package.getImplementationVersion() instead of the 
"build.properties" file; removes "build.properties" from the .jar files.

> Add API to return Version of Pivot retrieved from "build.properties"
> 
>
> Key: PIVOT-746
> URL: https://issues.apache.org/jira/browse/PIVOT-746
> Project: Pivot
>  Issue Type: New Feature
>  Components: wtk
>Affects Versions: 2.0.1
> Environment: Windows XP SP3, JDK 1.6.0_16
>Reporter: Roger Whitcomb
>Assignee: Greg Brown
>Priority: Trivial
> Fix For: 2.0.1
>
> Attachments: pivot746_patch2.patch, version.patch, version2.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Would be helpful to be able to determine programmatically what the version of 
> Pivot is.  The simplest method is to include "build.properties" which is the 
> original source of this information in the packaged .jar files and then to 
> provide an API to read and parse this value into a Version structure.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from "build.properties"

2011-05-24 Thread Roger Whitcomb (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038949#comment-13038949
 ] 

Roger Whitcomb commented on PIVOT-746:
--

Okay, so here's a patch that reverts the addition of "build.properties" to the 
.jar files and instead uses Andrei's method to get the Implementation-Version 
(which is already set by the value from "build.properties").  It should be 
fail-safe in the case of running from .class files and not from .jars.

> Add API to return Version of Pivot retrieved from "build.properties"
> 
>
> Key: PIVOT-746
> URL: https://issues.apache.org/jira/browse/PIVOT-746
> Project: Pivot
>  Issue Type: New Feature
>  Components: wtk
>Affects Versions: 2.0.1
> Environment: Windows XP SP3, JDK 1.6.0_16
>Reporter: Roger Whitcomb
>Assignee: Greg Brown
>Priority: Trivial
> Fix For: 2.0.1
>
> Attachments: pivot746_patch2.patch, version.patch, version2.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Would be helpful to be able to determine programmatically what the version of 
> Pivot is.  The simplest method is to include "build.properties" which is the 
> original source of this information in the packaged .jar files and then to 
> provide an API to read and parse this value into a Version structure.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-746) Add API to return Version of Pivot retrieved from "build.properties"

2011-05-24 Thread Andrei Pozolotin (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038943#comment-13038943
 ] 

Andrei Pozolotin commented on PIVOT-746:


another wild idea: there is not need for build.properties at all;

use instead:
http://download.oracle.com/javase/6/docs/api/java/lang/Package.html

getClass().getPackage().getSpecificationVersion();
getClass().getPackage().getSpecificationTitle();
getClass().getPackage().getImplementationVersion();
getClass().getPackage().getImplementationTitle();

:-)

> Add API to return Version of Pivot retrieved from "build.properties"
> 
>
> Key: PIVOT-746
> URL: https://issues.apache.org/jira/browse/PIVOT-746
> Project: Pivot
>  Issue Type: New Feature
>  Components: wtk
>Affects Versions: 2.0.1
> Environment: Windows XP SP3, JDK 1.6.0_16
>Reporter: Roger Whitcomb
>Assignee: Greg Brown
>Priority: Trivial
> Fix For: 2.0.1
>
> Attachments: pivot746_patch2.patch, version.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Would be helpful to be able to determine programmatically what the version of 
> Pivot is.  The simplest method is to include "build.properties" which is the 
> original source of this information in the packaged .jar files and then to 
> provide an API to read and parse this value into a Version structure.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Andrei Pozolotin (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038771#comment-13038771
 ] 

Andrei Pozolotin commented on PIVOT-747:


it is no more hack than checking for "main" in thread name, would you agree?

> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
>Assignee: Noel Grandin
>Priority: Minor
> Fix For: 2.0.1
>
> Attachments: Container.java, patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Andrei Pozolotin (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038768#comment-13038768
 ] 

Andrei Pozolotin commented on PIVOT-747:


re: "circumstances" - the original issue of pivot blowing up with exceptions 
under push()/pop();

my "name hack idea" is just replacement for your isEventDispatchThread():

##

public static final void assertEventDispatchThread() {
assert isEventDispatchThread();
}

public static final synchronized boolean isEventDispatchThread() {
   String threadName = Thread.currentThread().getName();
   return EventQueue.isDispatchThread() || threadName.equals("main") || 
threadName.startsWith("AWT-EventQueue-"); 
} 

##


> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
>Assignee: Noel Grandin
>Priority: Minor
> Fix For: 2.0.1
>
> Attachments: Container.java, patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Greg Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038669#comment-13038669
 ] 

Greg Brown commented on PIVOT-747:
--

Under what circumstances might an application want to call this method?


> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
>Assignee: Noel Grandin
>Priority: Minor
> Fix For: 2.0.1
>
> Attachments: Container.java, patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Andrei Pozolotin (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038597#comment-13038597
 ] 

Andrei Pozolotin commented on PIVOT-747:


still another little hack idea: why not permit more names! :-)

public static boolean isProperEDT() {
/*
 * Currently, application startup happens on the main thread, 
so we need
 * to allow that thread to modify WTK state.
 */
String threadName = Thread.currentThread().getName();
return EventQueue.isDispatchThread() || 
threadName.equals("main")
|| threadName.startsWith("AWT-EventQueue-");
}


> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
>Assignee: Noel Grandin
>Priority: Minor
> Fix For: 2.0.1
>
> Attachments: Container.java, patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Andrei Pozolotin (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038565#comment-13038565
 ] 

Andrei Pozolotin commented on PIVOT-747:


@Greg:
a) re: "applied a modified version of the patch" - thank you;
b) re: "encourage you to test" - sorry; I will;


> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
>Assignee: Noel Grandin
>Priority: Minor
> Fix For: 2.0.1
>
> Attachments: Container.java, patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Andrei Pozolotin (JIRA)

 [ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Pozolotin updated PIVOT-747:
---

Attachment: Container.java

@Greg & @Noel:
attached Container.java shows an idea of how to make edt police more people 
friendly; what do you think?

> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
>Assignee: Noel Grandin
>Priority: Minor
> Fix For: 2.0.1
>
> Attachments: Container.java, patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Sandro Martini (JIRA)

 [ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandro Martini updated PIVOT-747:
-

Comment: was deleted

(was: Hi all,
assign this issue to 2.0.1 and to Noel ?
)

> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
>Assignee: Noel Grandin
>Priority: Minor
> Fix For: 2.0.1
>
> Attachments: patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Greg Brown (JIRA)

 [ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Greg Brown updated PIVOT-747:
-

 Priority: Minor  (was: Major)
Fix Version/s: 2.0.1

> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
>Assignee: Noel Grandin
>Priority: Minor
> Fix For: 2.0.1
>
> Attachments: patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Greg Brown (JIRA)

 [ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Greg Brown reassigned PIVOT-747:


Assignee: Noel Grandin

> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
>Assignee: Noel Grandin
> Fix For: 2.0.1
>
> Attachments: patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Sandro Martini (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038553#comment-13038553
 ] 

Sandro Martini commented on PIVOT-747:
--

Hi all,
assign this issue to 2.0.1 and to Noel ?


> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
> Attachments: patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: build.properties

2011-05-24 Thread Sandro Martini
Hi Greg, 
thank you very much for the fix, I'll try during this week ...

Bye


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


build.properties

2011-05-24 Thread Greg Brown
FYI, I updated the code to fail gracefully when the build.properties file is 
missing, as Sandro suggested. I tried a couple of things to get the file on the 
classpath but couldn't come up with anything really clean.



[jira] [Commented] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Greg Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038540#comment-13038540
 ] 

Greg Brown commented on PIVOT-747:
--

@Noel - I don't think we should make assertEventDispatchThread() synchronized. 
That will incur a performance hit which, in my opinion, isn't justified for 
what is essentially debug code. It may be possible to avoid that penalty by 
wrapping the actual check in an assert:

public static final void assertEventDispatchThread() {
assert isEventDispatchThread();
}

public static final synchronized boolean isEventDispatchThread() {
return (java.awt.EventQueue.isDispatchThread()
 && !Thread.currentThread().getName().equals("main"));
}

However, it would probably be best to avoid this if possible.


> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
> Attachments: patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Greg Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038535#comment-13038535
 ] 

Greg Brown commented on PIVOT-747:
--

I have applied a modified version of the patch as the original didn't compile. 
I'd encourage you to test any future patches more thoroughly before submitting 
them. I also changed the name of the argument from "isOptional" to "optional" 
since Pivot's coding conventions don't include the "is" prefix in variable 
names, just getter methods.


> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
> Attachments: patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-747) pivot & blocking edt

2011-05-24 Thread Noel Grandin (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038532#comment-13038532
 ] 

Noel Grandin commented on PIVOT-747:


Thanks for your analysis Andrei.

There is not much I can do to fix EventQueue#isDispatchThread.

But does it help your situation if you change the 
Container#assertEventDispatchThread method to be synchronized?

That will force the VM to emit a memory barrier, which will at least enforce 
that it can see recent memory writes.


> pivot & blocking edt
> 
>
> Key: PIVOT-747
> URL: https://issues.apache.org/jira/browse/PIVOT-747
> Project: Pivot
>  Issue Type: Improvement
>  Components: wtk
>Affects Versions: 2.0
>Reporter: Andrei Pozolotin
> Attachments: patch-001-exit.patch
>
>
> Greg, hello;
> in this thread:
> http://mail-archives.apache.org/mod_mbox/pivot-user/201001.mbox/%3c4b5e581d.2080...@hms.harvard.edu%3E
> your final word is:
> "Sorry, it is not possible"
> but I know that you know that it is possible :-)
> the reason I need this is same as Martin here:
> http://netbeans.org/bugzilla/show_bug.cgi?id=90590
> namely: do some cleanup after shutdown was requested and confirmed:
> org.apache.pivot.wtk.Application
> public boolean shutdown(boolean optional) throws Exception;
> since you call shutdown(boolean optional) from EDT I need to block it, using 
> this approach:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> wich "almost works", except you have this check everywhere:
> Container.assertEventDispatchThread();
> which fails, as described above:
> http://bugs.sun.com/view_bug.do?bug_id=6424157
> due to EventQueue.isDispatchThread() failing on the "T1 vs T1*" distinction
> my request is this:
> do you think you could make 
> Container.assertEventDispatchThread();
> less pedantic, and allow both "current and past/next" EDT threads to pass 
> which are created during EventQueue push() / pop()
> thanks!
> Andrei

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-707) TextArea cant be edited when pivot applet loses focus

2011-05-24 Thread Sandro Martini (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038427#comment-13038427
 ] 

Sandro Martini commented on PIVOT-707:
--

Hi Nelson, thank you very much for the new info.
I'll try to look at it, but at this point I don't know if it will be fixed in 
time for the 2.0.1 ...

Thank you for now.
Bye


> TextArea cant be edited when pivot applet loses focus
> -
>
> Key: PIVOT-707
> URL: https://issues.apache.org/jira/browse/PIVOT-707
> Project: Pivot
>  Issue Type: Bug
>  Components: wtk
>Affects Versions: 2.0
> Environment: ArchLinux, Firefox 3.6.11, Java(TM) SE Runtime 
> Environment (build 1.6.0_22-b04) - Java HotSpot(TM) Server VM (build 
> 17.1-b03, mixed mode)
>Reporter: Nelson Garcia
>Priority: Minor
>  Labels: Bug, TextArea
> Fix For: 2.0.1
>
>
> When using a TextArea component and change to another browser tab (or take 
> another action that cause the Pivot applet to lose its focus) then get back 
> to the pivot applet browser's tab and try to edit the text inside TextArea 
> component: text will not change, nothing happens neither the Applet Console 
> shows any message. This behaviour can be reproduced with COmponent Explorer 
> in http://pivot.apache.org/demos/component-explorer.html.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIVOT-397) maven archetype for a minimal pivot application, to use as a starting point

2011-05-24 Thread Sandro Martini (JIRA)

[ 
https://issues.apache.org/jira/browse/PIVOT-397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038421#comment-13038421
 ] 

Sandro Martini commented on PIVOT-397:
--

I'll check new artifact as soon as possible, thank you very much for now
And ... great job :-) .

Bye


> maven archetype for a minimal pivot application, to use as a starting point
> ---
>
> Key: PIVOT-397
> URL: https://issues.apache.org/jira/browse/PIVOT-397
> Project: Pivot
>  Issue Type: New Feature
>Reporter: Sandro Martini
>Assignee: Sandro Martini
>Priority: Minor
> Fix For: 2.1
>
> Attachments: apachepivot-archetype-quickstart-jar.zip, 
> apachepivot-archetype-quickstart-source.zip, pivot-archetype-quickstart.zip, 
> pivot-quickstart.zip
>
>
> Create a maven archetype for a basic (minimal, near-empty) pivot application 
> (like most -basic archetypes for other frameworks).
> This could require a dedicated new subproject, if tools is not the right 
> place for it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira