Package org.python.pydev.refactoring.codegenerator.generateproperties.request

Examples of org.python.pydev.refactoring.codegenerator.generateproperties.request.SelectionState


        List<AbstractTextEdit> setters = new LinkedList<AbstractTextEdit>();
        List<AbstractTextEdit> deleters = new LinkedList<AbstractTextEdit>();

        /* Collect all edits and assign them to the corresponding editGroups. */
        for (GeneratePropertiesRequest req : requestProcessor.getRefactoringRequests()) {
            SelectionState state = req.getSelectionState();

            if (state.isGetter()) {
                getters.add(new GetterMethodEdit(req));
            }

            if (state.isSetter()) {
                setters.add(new SetterMethodEdit(req));
            }

            if (state.isDelete()) {
                deleters.add(new DeleteMethodEdit(req));
            }
        }

        List<AbstractTextEdit> propertyEdits = new LinkedList<AbstractTextEdit>();
View Full Code Here


    private IDocument applyGenerateProperties(MockupGeneratePropertiesRequestProcessor requestProcessor)
            throws BadLocationException, MalformedTreeException, MisconfigurationException {
        IDocument refactoringDoc = new Document(data.source);
        MultiTextEdit multi = new MultiTextEdit();
        for (GeneratePropertiesRequest req : requestProcessor.getRefactoringRequests()) {
            SelectionState state = req.getSelectionState();

            if (state.isGetter()) {
                multi.addChild(new GetterMethodEdit(req).getEdit());
            }
            if (state.isSetter()) {
                multi.addChild(new SetterMethodEdit(req).getEdit());
            }
            if (state.isDelete()) {
                multi.addChild(new DeleteMethodEdit(req).getEdit());
            }
            multi.addChild(new PropertyEdit(req).getEdit());
        }
        multi.apply(refactoringDoc);
View Full Code Here

TOP

Related Classes of org.python.pydev.refactoring.codegenerator.generateproperties.request.SelectionState

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.