Changeset 2748


Ignore:
Timestamp:
May 11, 2007, 4:38:07 AM (14 years ago)
Author:
orlov
Message:
  • Added "Toggle Comment" action binded to Ctrl+/.
  • "Source" top-level menu.
Location:
devel-tools/trunk/eclipse
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/META-INF/MANIFEST.MF

    r2740 r2748  
    1111 org.eclipse.jface.text,
    1212 org.eclipse.ui.editors,
    13  org.eclipse.ui.workbench.texteditor
     13 org.eclipse.ui.workbench.texteditor,
     14 org.refal.plus.rfpdt
    1415Eclipse-LazyStart: true
    1516Bundle-RequiredExecutionEnvironment: J2SE-1.5
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/plugin.xml

    r2723 r2748  
    2222            extensions="rf,rfi"/>
    2323   </extension>
     24   <extension
     25         point="org.eclipse.ui.contexts">
     26      <context
     27            name="Editing Refal Plus Source"
     28            description="Editing source in a Refal Plus editor"
     29            parentId="org.eclipse.ui.textEditorScope"
     30            id="org.refal.plus.rfpdt.editor.RfpEditorScope">
     31      </context>
     32   </extension>
     33   <extension
     34         point="org.eclipse.ui.editorActions">
     35      <editorContribution
     36            id="org.refal.plus.rfpdt.editor.RfpEditorActions"
     37            targetID="org.refal.plus.rfpdt.editor.RfpEditor">
     38         <menu
     39               id="org.refal.plus.rfpdt.editor.RfpEditorPopupSubMenu"
     40               label="&amp;Source"
     41               path="edit">
     42            <groupMarker name="content"/>
     43            <separator name="additions"/>
     44         </menu>
     45         <action
     46               class="org.refal.plus.rfpdt.editor.ToggleCommentAction"
     47               definitionId="org.refal.plus.rfpdt.editor.commands.ToggleComment"
     48               id="org.refal.plus.rfpdt.editor.ToggleCommentActionInRfpEditor"
     49               label="Togg&amp;le Comment"
     50               menubarPath="org.refal.plus.rfpdt.editor.RfpEditorPopupSubMenu/content"
     51               style="push"/>
     52      </editorContribution>
     53   </extension>
     54   <extension
     55         point="org.eclipse.ui.commands">
     56      <category
     57            description="Refal Plus editor commands"
     58            id="org.refal.plus.rfpdt.editor.commands"
     59            name="Refal Plus"/>
     60      <command
     61            categoryId="org.refal.plus.rfpdt.editor.commands"
     62            description="Comment/Uncomment selected lines"
     63            id="org.refal.plus.rfpdt.editor.commands.ToggleComment"
     64            name="Toggle Comment"/>
     65   </extension>
     66   <extension
     67         point="org.eclipse.ui.bindings">
     68      <key
     69            commandId="org.refal.plus.rfpdt.editor.commands.ToggleComment"
     70            contextId="org.refal.plus.rfpdt.editor.RfpEditorScope"
     71            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
     72            sequence="Ctrl+/"/>
     73   </extension>
    2474
    2575</plugin>
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/src/org/refal/plus/rfpdt/editor/RfpConfiguration.java

    r2697 r2748  
    1616
    1717public class RfpConfiguration extends SourceViewerConfiguration {
     18        private static final String[] defaultPrefixes = { "//" };
    1819        private RfpDoubleClickStrategy doubleClickStrategy;
    1920        private RfpScanner scanner;
     
    7273                return new DefaultAnnotationHover();
    7374        }
     75       
     76        public String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType) {
     77                return defaultPrefixes;
     78        }
    7479}
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/src/org/refal/plus/rfpdt/editor/RfpEditor.java

    r2697 r2748  
    1919        }
    2020
     21        protected void initializeKeyBindingScopes() {
     22        setKeyBindingScopes(new String[] { RfpEditorPlugin.RFP_EDITING_KEYBINDING_SCOPE });     
     23        }
     24
    2125}
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/src/org/refal/plus/rfpdt/editor/RfpEditorPlugin.java

    r2554 r2748  
    1313        public static final String PLUGIN_ID = "org.refal.plus.rfpdt.editor";
    1414       
    15         public final static String RFP_PARTITIONING= "__rfp_partitioning";   //$NON-NLS-1$
     15        public final static String RFP_PARTITIONING = "__rfp_partitioning";   //$NON-NLS-1$
     16
     17        public final static String RFP_EDITING_KEYBINDING_SCOPE = "org.refal.plus.rfpdt.editor.RfpEditorScope";
    1618
    1719        // The shared instance
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt/META-INF/MANIFEST.MF

    r2740 r2748  
    1515Eclipse-LazyStart: true
    1616Bundle-RequiredExecutionEnvironment: J2SE-1.5
     17Export-Package: org.refal.plus.rfpdt.core
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt/src/org/refal/plus/rfpdt/core/RfpCorePlugin.java

    r2106 r2748  
    9393                getDefault().getLog().log(status);
    9494        }
     95
     96        public static void log(Throwable e) {
     97                log(new Status(IStatus.ERROR, getPluginId(), IStatus.OK, "Internal error", e));
     98        }
    9599}
Note: See TracChangeset for help on using the changeset viewer.