IDE-1569 custom jsps add ability to quickly disable validation

Right, I see, in that case you can still run the job in a normal job but
when you need to prompt the user you can add a UIThread call using
UIUtil.sync().  So that way it will block on the UI thread to perform some
operation which from a worker thread is safe.

On Mon, Sep 29, 2014 at 10:25 AM, simon.jiang <notifications@github.com>
wrote:

> In
> tools/plugins/com.liferay.ide.hook.ui/src/com/liferay/ide/hook/ui/HookCustomJspValidationResolution.java:
>
> > +
> > +    public void run( IMarker marker )
> > +    {
> > +        final IProject project = marker.getResource().getProject();
> > +
> > +        IPath customJspPath = HookUtil.getCustomJspPath( project );
> > +
> > +        if( customJspPath != null )
> > +        {
> > +            final boolean returnCode =
> > +                HookUtil.configureJSPSyntaxValidationExclude(
> > +                project, project.getFolder( customJspPath.makeRelativeTo( project.getFullPath() ) ) );
> > +
> > +            if( returnCode )
> > +            {
> > +                UIJob validateJob = new UIJob( "Validation Job" )
>
> We can't run it in a non-ui thread because this job will pop up a confirm
> dialog need user. We can only use non-ui when we don't need user inactive
> and automaticly all validation action.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/gamerson/liferay-ide/pull/688/files#r18135332>.
>



-- 
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com