Package org.python.pydev.refactoring.ui.pages.core

Examples of org.python.pydev.refactoring.ui.pages.core.SimpleTableItem


                int selectionIndex = argumentsTable.getSelectionIndex();
                if (argumentsTable.getSelectionCount() == 1 && selectionIndex != argumentsTable.getItemCount()) {

                    TableItem item = argumentsTable.getSelection()[0];
                    if (item instanceof SimpleTableItem) {
                        SimpleTableItem tableItem = (SimpleTableItem) item;

                        new SimpleTableItem(argumentsTable, tableItem.getOriginalName(), tableItem.getText(),
                                selectionIndex + 2);
                        argumentsTable.remove(selectionIndex);
                        argumentsTable.setSelection(selectionIndex + 1);
                        argumentsTable.notifyListeners(SWT.Selection, new Event());
                        page.validate();
View Full Code Here


                int selectionIndex = argumentsTable.getSelectionIndex();
                if (argumentsTable.getSelectionCount() == 1 && selectionIndex > 0) {

                    TableItem item = argumentsTable.getSelection()[0];
                    if (item instanceof SimpleTableItem) {
                        SimpleTableItem tableItem = (SimpleTableItem) item;

                        new SimpleTableItem(argumentsTable, tableItem.getOriginalName(), tableItem.getText(),
                                selectionIndex - 1);
                        argumentsTable.remove(selectionIndex + 1);
                        argumentsTable.setSelection(selectionIndex - 1);
                        argumentsTable.notifyListeners(SWT.Selection, new Event());
                        page.validate();
View Full Code Here

    }

    public void initTable(List<String> arguments) {
        for (String argument : arguments) {
            new SimpleTableItem(getArgumentsTable(), argument);
        }
    }
View Full Code Here

        NameValidator validator = new NameValidator(status, this.scope);

        TableItem[] items = table.getItems();
        for (TableItem item : items) {
            if (item instanceof SimpleTableItem) {
                SimpleTableItem variableItem = (SimpleTableItem) item;
                if (variableItem.hasNewName()) {
                    validator.validateVariableName(item.getText());
                    validator.validateUniqueVariable(item.getText());
                }
            }
        }
View Full Code Here

        if (extractComposite.getArgumentsTable() != null) {
            List<String> parameterOrder = new ArrayList<String>();
            Map<String, String> parameterMap = new HashMap<String, String>();
            for (TableItem item : extractComposite.getArgumentsTable().getItems()) {
                if (item instanceof SimpleTableItem) {
                    SimpleTableItem tableItem = (SimpleTableItem) item;
                    parameterMap.put(tableItem.getOriginalName(), tableItem.getText());
                    parameterOrder.add(tableItem.getOriginalName());
                }
            }
            getRequestProcessor().setParameterMap(parameterMap);
            getRequestProcessor().setParameterOrder(parameterOrder);
        }
View Full Code Here

        Rectangle bounds = table.getSelection()[0].getBounds();
        Point pt = new Point(bounds.x, bounds.y);
        int index = table.getTopIndex();
        while (index < table.getItemCount()) {
            boolean visible = false;
            final SimpleTableItem item = (SimpleTableItem) table.getItem(index);
            for (int i = 0; i < table.getColumnCount(); i++) {
                Rectangle rect = item.getBounds(i);
                if (rect.contains(pt)) {

                    final Text text = new Text(table, SWT.NONE);
                    Listener textListener = new TextListener(item, text);

                    text.addListener(SWT.FocusOut, textListener);
                    text.addListener(SWT.Traverse, textListener);
                    text.addListener(SWT.FocusOut, wizard);
                    editor.setEditor(text, item, i);
                    text.setText(item.getText(i));
                    text.selectAll();
                    text.setFocus();
                    return;
                }
                if (!visible && rect.intersects(clientArea)) {
View Full Code Here

TOP

Related Classes of org.python.pydev.refactoring.ui.pages.core.SimpleTableItem

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.