Examples of IErlSelection


Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

                endLine = (OtpErlangLong) ((OtpErlangTuple) actPos.elementAt(1))
                        .elementAt(0);
                endColumn = (OtpErlangLong) ((OtpErlangTuple) actPos.elementAt(1))
                        .elementAt(1);

                final IErlSelection sel = GlobalParameters.getWranglerSelection();
                instances.add(new DuplicatedCodeInstanceElement((IFile) sel
                        .getErlElement().getResource(), startLine.intValue(), startColumn
                        .intValue(), endLine.intValue(), endColumn.intValue() + 1));
            }

            final DuplicatedCodeInstanceElement defaultInstance = instances.get(0);
View Full Code Here

Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

        }
        try {
            final File tmpFile = File.createTempFile("wrangler_graph_", ".dot");
            tmpFile.deleteOnExit();

            final IErlSelection wranglerSelection = GlobalParameters
                    .getWranglerSelection();

            if (actionId
                    .equals("org.erlide.wrangler.refactoring.codeinspection.cyclicdependencies")) {
                final Boolean answer = MessageDialog.openQuestion(PlatformUI
                        .getWorkbench().getActiveWorkbenchWindow().getShell(), "Labels",
                        "Label edges with function names called?");
                runInspection("Cyclic module dependency", CYCLYC_VIEW_ID,
                        "There is no cyclic dependent modules in the project!", tmpFile,
                        "cyclic_dependent_modules", "ssx", tmpFile.getAbsolutePath(),
                        wranglerSelection.getSearchPath(), new OtpErlangBoolean(answer));
            } else if (actionId
                    .equals("org.erlide.wrangler.refactoring.codeinspection.generatefunctioncallgraph")) {
                runInspection("Function callgraph", FUNCTION_CALL_GRAPH_VIEW_ID,
                        "There is no dependent functions in the module!", tmpFile,
                        "gen_function_callgraph", "sss", tmpFile.getAbsolutePath(),
                        wranglerSelection.getFilePath(),
                        wranglerSelection.getSearchPath());

            } else if (actionId
                    .equals("org.erlide.wrangler.refactoring.codeinspection.generatemodulegraph")) {
                final Boolean answer = MessageDialog.openQuestion(PlatformUI
                        .getWorkbench().getActiveWorkbenchWindow().getShell(), "Labels",
                        "Label edges with function names called?");
                runInspection("Module dependency graph", MODULE_GRAPH_VIEW_ID,
                        "There is no dependent modules in the project!", tmpFile,
                        "gen_module_graph", "ssx", tmpFile.getAbsolutePath(),
                        wranglerSelection.getSearchPath(), new OtpErlangBoolean(answer));

            } else if (actionId
                    .equals("org.erlide.wrangler.refactoring.codeinspection.improperdependecies")) {
                runInspection("Improper module dependencies",
                        IMPROPER_DEPENDECIES_VIEW_ID,
                        "There is no improper module dependecies!", tmpFile,
                        "improper_inter_module_calls", "ss", tmpFile.getAbsolutePath(),
                        wranglerSelection.getSearchPath());

            }

        } catch (final Exception e) {
            ErlLogger.error(e);
View Full Code Here

Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

            MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                    .getShell(), "Error", e.getMessage());
            return null;
        }

        final IErlSelection wranglerSelection = GlobalParameters.getWranglerSelection();
        final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                .getShell();

        if (actionId
                .equals("org.erlide.wrangler.refactoring.codeinspection.largemodules")) {
View Full Code Here

Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

    }

    @Override
    public RefactoringStatus checkFinalConditions(final IProgressMonitor pm)
            throws CoreException, OperationCanceledException {
        final IErlSelection sel = GlobalParameters.getWranglerSelection();
        final IRefactoringRpcMessage theMessage = run(sel);
        if (theMessage.isSuccessful()) {
            changedFiles = theMessage.getRefactoringChangeset();
            return new RefactoringStatus();
        }
View Full Code Here

Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

    public RefactoringWorkflowController getWorkflowController(final Shell shell) {
        return new RefactoringWorkflowController(shell) {

            @Override
            public void doRefactoring() {
                final IErlSelection sel = GlobalParameters.getWranglerSelection();
                IRefactoringRpcMessage message = run(sel);
                if (message.isSuccessful()) {
                    changedFiles = message.getRefactoringChangeset();
                    status = new RefactoringStatus();
                } else if (message.getRefactoringState() == RefactoringState.QUESTION) {
View Full Code Here

Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

    }

    @Override
    public String getDefaultValue() {
        final IErlSelection sel = GlobalParameters.getWranglerSelection();
        if (sel == null) {
            return "";
        }

        return sel.getErlModule().getModuleName();
    }
View Full Code Here

Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

    }

    @Override
    public RefactoringStatus checkFinalConditions(final IProgressMonitor pm)
            throws CoreException, OperationCanceledException {
        final IErlSelection sel = GlobalParameters.getWranglerSelection();
        final IRefactoringRpcMessage message = run(sel);
        if (message.isSuccessful()) {
            changedFiles = message.getRefactoringChangeset();
            return new RefactoringStatus();
        }
View Full Code Here

Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

    }

    @Override
    public RefactoringStatus checkFinalConditions(final IProgressMonitor pm)
            throws CoreException, OperationCanceledException {
        final IErlSelection sel = GlobalParameters.getWranglerSelection();
        IRefactoringRpcMessage message = run(sel);
        if (message.isSuccessful()) {
            changedFiles = message.getRefactoringChangeset();
            return new RefactoringStatus();
        } else if (message.getRefactoringState() == RefactoringState.QUESTION) {
View Full Code Here

Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

    protected int numberOfTuplingParameters = -1;

    @Override
    public RefactoringStatus checkInitialConditions(final IProgressMonitor pm)
            throws CoreException, OperationCanceledException {
        final IErlSelection sel = GlobalParameters.getWranglerSelection();
        if (sel instanceof IErlMemberSelection) {
            final SelectionKind kind = sel.getKind();
            if (kind == SelectionKind.FUNCTION_CLAUSE || kind == SelectionKind.FUNCTION) {
                final IErlMemberSelection s = (IErlMemberSelection) sel;
                numberOfTuplingParameters = calculateParametersNumber(WranglerUtils
                        .getTextFromEditor(s.getSelectionRange(), s.getDocument()));
                if (numberOfTuplingParameters > 0) {
View Full Code Here

Examples of org.erlide.wrangler.refactoring.selection.IErlSelection

    }

    @Override
    public RefactoringStatus checkFinalConditions(final IProgressMonitor pm)
            throws CoreException, OperationCanceledException {
        final IErlSelection sel = GlobalParameters.getWranglerSelection();
        final IRefactoringRpcMessage message = run(sel);
        if (message.isSuccessful()) {
            changedFiles = message.getRefactoringChangeset();
            return new RefactoringStatus();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.