@Override public void mouseUp(MouseEvent e) { checkSelection(); checkDeleteable(); checkSelectable(); } });
protected void handleDefaultSelection(SelectionEvent event) { // same with enter-key handling code in keyReleaseOccured(e); fireApplyEditorValue(); deactivate(); }
public void modifyText(ModifyEvent e) { editOccured(e); } };
protected void checkDeleteable() { boolean oldIsDeleteable = isDeleteable; isDeleteable = isDeleteEnabled(); if (oldIsDeleteable != isDeleteable) { fireEnablementChanged(DELETE); } }
@Override public void keyPressed(KeyEvent e) { keyReleaseOccured(e); // as a result of processing the above call, clients may have // disposed this cell editor if ((getControl() == null) || getControl().isDisposed()) return; checkSelection(); // see explaination below checkDeleteable(); checkSelectable(); } });
editors[TYPE_PROP]= new TableTextCellEditor(fTableViewer, TYPE_PROP); editors[NEWNAME_PROP]= new TableTextCellEditor(fTableViewer, NEWNAME_PROP); editors[DEFAULT_PROP]= new TableTextCellEditor(fTableViewer, DEFAULT_PROP); SubjectControlContentAssistant assistant= installParameterTypeContentAssist(editors[TYPE_PROP].getText()); editors[TYPE_PROP].setContentAssistant(assistant); SubjectControlContentAssistant assistant= installParameterNameContentAssist(editors[NEWNAME_PROP].getText()); editors[NEWNAME_PROP].setContentAssistant(assistant); final TableTextCellEditor editor = editors[i]; editor.getText().addTraverseListener(new TraverseListener() { @Override public void keyTraversed(TraverseEvent e) { TextFieldNavigationHandler.install(editor.getText()); editors[NEWNAME_PROP].setActivationListener(new TableTextCellEditor.IActivationListener(){ @Override public void activate() {
Text cellEditorText= cellEditor.getText(); TextFieldNavigationHandler.install(cellEditorText); if (fProject != null) { SubjectControlContentAssistant contentAssistant= ControlContentAssistHelper.createJavaContentAssistant(annotationCompletionProcessor); ContentAssistHandler.createHandlerForText(cellEditorText, contentAssistant); cellEditor.setContentAssistant(contentAssistant);
@Override public void performSelectAll() { text.selectAll(); checkSelection(); checkDeleteable(); }
protected void checkSelectable() { boolean oldIsSelectable = isSelectable; isSelectable = isSelectAllEnabled(); if (oldIsSelectable != isSelectable) { fireEnablementChanged(SELECT_ALL); } }
protected void checkSelection() { boolean oldIsSelection = isSelection; isSelection = text.getSelectionCount() > 0; if (oldIsSelection != isSelection) { fireEnablementChanged(COPY); fireEnablementChanged(CUT); } }
if (e.keyCode == SWT.ARROW_UP || e.keyCode == SWT.ARROW_DOWN) { deactivate(); e.doit= false; return; deactivate(); break;
@Override public void keyPressed(KeyEvent e) { keyReleaseOccured(e); // as a result of processing the above call, clients may have // disposed this cell editor if ((getControl() == null) || getControl().isDisposed()) return; checkSelection(); // see explaination below checkDeleteable(); checkSelectable(); } });
editors[TYPE_PROP]= new TableTextCellEditor(fTableViewer, TYPE_PROP); editors[NEWNAME_PROP]= new TableTextCellEditor(fTableViewer, NEWNAME_PROP); editors[DEFAULT_PROP]= new TableTextCellEditor(fTableViewer, DEFAULT_PROP); SubjectControlContentAssistant assistant= installParameterTypeContentAssist(editors[TYPE_PROP].getText()); editors[TYPE_PROP].setContentAssistant(assistant); SubjectControlContentAssistant assistant= installParameterNameContentAssist(editors[NEWNAME_PROP].getText()); editors[NEWNAME_PROP].setContentAssistant(assistant); final TableTextCellEditor editor = editors[i]; editor.getText().addTraverseListener(new TraverseListener() { public void keyTraversed(TraverseEvent e) { switch (e.detail) { TextFieldNavigationHandler.install(editor.getText()); editors[NEWNAME_PROP].setActivationListener(new TableTextCellEditor.IActivationListener(){ public void activate() { ParameterInfo[] selected= getSelectedElements();
Text cellEditorText= cellEditor.getText(); ContentAssistHandler.createHandlerForText(cellEditorText, contentAssistant); TextFieldNavigationHandler.install(cellEditorText); cellEditor.setContentAssistant(contentAssistant);
@Override public void performSelectAll() { text.selectAll(); checkSelection(); checkDeleteable(); }
protected void checkDeleteable() { boolean oldIsDeleteable = isDeleteable; isDeleteable = isDeleteEnabled(); if (oldIsDeleteable != isDeleteable) { fireEnablementChanged(DELETE); } }
protected void checkSelectable() { boolean oldIsSelectable = isSelectable; isSelectable = isSelectAllEnabled(); if (oldIsSelectable != isSelectable) { fireEnablementChanged(SELECT_ALL); } }
protected void checkSelection() { boolean oldIsSelection = isSelection; isSelection = text.getSelectionCount() > 0; if (oldIsSelection != isSelection) { fireEnablementChanged(COPY); fireEnablementChanged(CUT); } }
if (e.keyCode == SWT.ARROW_UP || e.keyCode == SWT.ARROW_DOWN) { deactivate(); e.doit= false; return; deactivate(); break;
public void mouseUp(MouseEvent e) { checkSelection(); checkDeleteable(); checkSelectable(); } });