[jbosstools-issues] [JBoss JIRA] (JBIDE-10357) Add listeners in VpeController to support full/partial VPE refresh monitoring.

Yahor Radtsevich (Commented) (JIRA) jira-events at lists.jboss.org
Tue Dec 6 08:13:41 EST 2011


    [ https://issues.jboss.org/browse/JBIDE-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648374#comment-12648374 ] 

Yahor Radtsevich commented on JBIDE-10357:
------------------------------------------

Thanks for the patch, Maxim! I will be happy to apply the patch after you explain/fix these two issues with it:
# why there are duplicate calls of addJobListeners(uiJob, refreshListeners) in the following code. Can we move them outside the if/else?
{code:java}
if (uiJob.getState() != Job.RUNNING) {
	uiJob.setPriority(Job.LONG);
	addJobListeners(uiJob, refreshListeners);
	// Fix of JBIDE-1900
	uiJob.schedule(getVpeUpdateDelayTime());
} else {
	uiJob.cancel();
	addJobListeners(uiJob, refreshListeners);
	uiJob.schedule(getVpeUpdateDelayTime());
	setVpeUpdateDelayTime(400);
}
{code}
# It is not common to check for {{null}} in add/remove listener methods. These methods should throw an exception (NPE?) in this case.
{code:java}
public void addRefreshJobChangeListener(final IJobChangeListener listener) {
	if (listener != null) {
		refreshListeners.add(listener);
	}
}
{code}
                
> Add listeners in VpeController to support full/partial VPE refresh monitoring.
> ------------------------------------------------------------------------------
>
>                 Key: JBIDE-10357
>                 URL: https://issues.jboss.org/browse/JBIDE-10357
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: Visual Page Editor core
>    Affects Versions: 3.3.0.Beta1
>            Reporter: Maxim Shmidov
>            Assignee: Yahor Radtsevich
>         Attachments: VpeController.java.patch
>
>
> In some cases i need to know when VPE intitiates or finishes visual refresh. Implementation of required listeners is very simple, and i already have a patch with this functionality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list