Package lapsePlus.views.LapseView

Examples of lapsePlus.views.LapseView.SlicingFromSinkJob


            public void run() {
                LapseView lapseView = LapsePlugin.getDefault().getLapseView();
                if (lapseView != null) {
                    ViewMatch match = ((ViewMatch) ((IStructuredSelection) viewer.getSelection()).getFirstElement());
                    ASTNode astNode = match.getAST();
                    SlicingFromSinkJob job = lapseView.getSinkSlicingJob();
                    if(job != null) {
                        ASTNode arg = null;
                        if (astNode instanceof MethodInvocation) {
                            arg = (ASTNode) ((MethodInvocation) astNode).arguments().get(0);
                        } else if(astNode instanceof ClassInstanceCreation)
                        {
                          arg=(ASTNode)((ClassInstanceCreation) astNode).arguments().get(0);
                        }
                        else
                        {
                            logError("Unrecognized " + astNode);
                            return;
                        }
                        job.setSink(arg);
                        job.setUnit(match.getUnit());
                        job.setResource(match.getResource());
                       
                        // switch to the provenance tracker view
                        lapseView.refresh();
                        lapseView.setFocus();
                       
                        // run the job         
                        job.schedule();
                    } else {
                        MessageDialog.openError(
                            viewer.getControl().getShell(),
                            "Error occurred",
                            "The provenance view is closed. Please open it and try again.");
View Full Code Here

TOP

Related Classes of lapsePlus.views.LapseView.SlicingFromSinkJob

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.