Changeset 3862 for devel-tools
- Timestamp:
- Jul 23, 2008, 12:22:09 PM (12 years ago)
- Location:
- devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/actions
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/actions/IndentAction.java
r3859 r3862 40 40 if (target != null) 41 41 target.beginCompoundChange(); 42 43 42 try { 44 43 for (int line = firstLine; line < firstLine + nLines; line++) { … … 63 62 // will only happen on concurrent modification 64 63 RfpUI.log("ConcurrentModification in IndentAction", e); //$NON-NLS-1$ 65 66 64 } finally { 67 65 if (target != null) -
devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/actions/OpenDeclarationAction.java
r3860 r3862 21 21 22 22 public class OpenDeclarationAction extends RfpEditorActionDelegate { 23 public static final String OPEN_DECLARATION = "openDeclaration"; //$NON-NLS-1$24 25 23 public void run () { 26 24 if (editor == null) … … 84 82 return null; 85 83 } 86 87 84 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/actions/RetargettableActionAdapterFactory.java
r3508 r3862 11 11 */ 12 12 public class RetargettableActionAdapterFactory implements IAdapterFactory { 13 /*14 * (non-Javadoc)15 *16 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)17 */18 13 @SuppressWarnings("unchecked") 19 14 public Object getAdapter (Object adaptableObject, Class adapterType) { 20 if (adapterType == IToggleBreakpointsTarget.class) {15 if (adapterType == IToggleBreakpointsTarget.class) 21 16 return new ToggleBreakpointAdapter(); 22 }23 17 return null; 24 18 } 25 19 26 /*27 * (non-Javadoc)28 *29 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()30 */31 20 @SuppressWarnings("unchecked") 32 21 public Class[] getAdapterList () { -
devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/actions/RfpEditorActionDelegate.java
r3859 r3862 18 18 19 19 public void run (IAction action) { 20 this.run();20 run(); 21 21 } 22 22 … … 39 39 40 40 /** 41 * Returns the editor's selection provider.42 *43 * @return the editor's selection provider or <code>null</code>44 */45 protected ISelectionProvider getSelectionProvider () {46 if (editor != null)47 return editor.getSelectionProvider();48 return null;49 }50 51 /**52 41 * Returns the selection on the editor or an invalid selection if none can be obtained. Returns never 53 42 * <code>null</code>. … … 56 45 */ 57 46 protected ITextSelection getSelection () { 58 ISelectionProvider provider = getSelectionProvider(); 59 if (provider != null) { 60 ISelection selection = provider.getSelection(); 61 if (selection instanceof ITextSelection) 62 return (ITextSelection) selection; 47 if (editor != null) { 48 ISelectionProvider provider = editor.getSelectionProvider(); 49 if (provider != null) { 50 ISelection selection = provider.getSelection(); 51 if (selection instanceof ITextSelection) 52 return (ITextSelection) selection; 53 } 63 54 } 64 55 return TextSelection.emptySelection(); … … 66 57 67 58 public void setActiveEditor (IAction action, IEditorPart editor) { 68 if (editor instanceof RfpEditor) 69 this.editor = (RfpEditor) editor; 70 else 71 this.editor = null; 59 this.editor = editor instanceof RfpEditor ? (RfpEditor) editor : null; 72 60 } 73 61
Note: See TracChangeset
for help on using the changeset viewer.