Changeset 3503


Ignore:
Timestamp:
Mar 13, 2008, 4:28:19 PM (13 years ago)
Author:
yura
Message:
  • ui.actions package.
Location:
devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui
Files:
1 added
3 edited
8 moved

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/plugin.xml

    r3502 r3503  
    66      <editor
    77            class="org.refal.plus.rfpdt.editor.RfpEditor"
    8             contributorClass="org.refal.plus.rfpdt.editor.RfpEditorActionContributor"
     8            contributorClass="org.refal.plus.rfpdt.ui.actions.RfpEditorActionContributor"
    99            default="true"
    1010            extensions="rf,rfi"
     
    3737            targetID="#TextEditorContext">
    3838         <action
    39                class="org.refal.plus.rfpdt.editor.ToggleCommentAction"
     39               class="org.refal.plus.rfpdt.ui.actions.ToggleCommentAction"
    4040               definitionId="org.refal.plus.rfpdt.editor.commands.ToggleComment"
    4141               id="org.refal.plus.rfpdt.editor.editorContextMenu.toggleComment"
     
    4343               menubarPath="group.edit"/>
    4444         <action
    45                class="org.refal.plus.rfpdt.editor.IndentAction"
     45               class="org.refal.plus.rfpdt.ui.actions.IndentAction"
    4646               definitionId="org.refal.plus.rfpdt.editor.commands.CorrectIndent"
    4747               id="org.refal.plus.rfpdt.editor.editorContextMenu.correctIndent"
     
    7373         </menu>
    7474         <action
    75                class="org.refal.plus.rfpdt.editor.ToggleCommentAction"
     75               class="org.refal.plus.rfpdt.ui.actions.ToggleCommentAction"
    7676               definitionId="org.refal.plus.rfpdt.editor.commands.ToggleComment"
    7777               id="org.refal.plus.rfpdt.editor.ToggleCommentActionInSourceMenu"
     
    7979               menubarPath="org.refal.plus.rfpdt.editor.RfpEditorSourceMenu/content"/>
    8080         <action
    81                class="org.refal.plus.rfpdt.editor.IndentAction"
     81               class="org.refal.plus.rfpdt.ui.actions.IndentAction"
    8282               definitionId="org.refal.plus.rfpdt.editor.commands.CorrectIndent"
    8383               id="org.refal.plus.rfpdt.editor.CorrectIdentActionInSourceMenu"
     
    8585               menubarPath="org.refal.plus.rfpdt.editor.RfpEditorSourceMenu/content"/>
    8686         <action
    87                class="org.refal.plus.rfpdt.editor.FormatAction"
     87               class="org.refal.plus.rfpdt.ui.actions.FormatAction"
    8888               definitionId="org.refal.plus.rfpdt.editor.commands.Format"
    8989               id="org.refal.plus.rfpdt.editor.FormatActionInSourceMenu"
     
    190190      <factory
    191191            adaptableType="org.refal.plus.rfpdt.editor.RfpEditor"
    192             class="org.refal.plus.rfpdt.editor.RetargettableActionAdapterFactory">
     192            class="org.refal.plus.rfpdt.ui.actions.RetargettableActionAdapterFactory">
    193193            <adapter type="org.eclipse.debug.ui.actions.IToggleBreakpointsTarget"/>
    194194     </factory>
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/editor/BracketMatcher.java

    r3444 r3503  
    1010import org.eclipse.jface.text.source.ICharacterPairMatcher;
    1111
    12 class BracketMatcher implements ICharacterPairMatcher {
     12public class BracketMatcher implements ICharacterPairMatcher {
    1313    private int fAnchor = -1;
    1414
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/editor/RfpEditor.java

    r3444 r3503  
    5151import org.refal.plus.rfpdt.editor.color.ColorManager;
    5252import org.refal.plus.rfpdt.editor.preferences.IPreferenceConstants;
     53import org.refal.plus.rfpdt.ui.actions.GotoMatchingBracketAction;
     54import org.refal.plus.rfpdt.ui.actions.IRfpEditorActionDefinitionIds;
    5355
    5456public class RfpEditor extends TextEditor {
     
    156158
    157159    private BracketInserter bracketInserter;
    158     BracketMatcher bracketMatcher;
     160    private final BracketMatcher bracketMatcher;
    159161    private IPropertyChangeListener propertyChangeListener;
    160162    private RfpSourceViewerConfiguration rfpSourceViewerConfiguration;
     
    328330                .addPostSelectionChangedListener(new SelectionChangedListener());
    329331    }
    330 
    331     ISourceViewer sourceViewer () {
     332   
     333    public BracketMatcher getBracketMatcher () {
     334        return bracketMatcher;
     335    }
     336
     337    public ISourceViewer sourceViewer () {
    332338        return getSourceViewer();
    333339    }
    334340
    335     int widgetOffset2ModelOffset (int offset) {
     341    public int widgetOffset2ModelOffset (int offset) {
    336342        return widgetOffset2ModelOffset(getSourceViewer(), offset);
    337343    }
    338344
    339     void statusLineErrorMessage (String str) {
     345    public void statusLineErrorMessage (String str) {
    340346        setStatusLineErrorMessage(str);
    341347    }
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/ui/actions/FormatAction.java

    r3501 r3503  
    1 package org.refal.plus.rfpdt.editor;
     1package org.refal.plus.rfpdt.ui.actions;
    22
    33import org.eclipse.jface.text.ITextSelection;
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/ui/actions/GotoMatchingBracketAction.java

    r3501 r3503  
    1 package org.refal.plus.rfpdt.editor;
     1package org.refal.plus.rfpdt.ui.actions;
    22
    33import org.eclipse.core.runtime.Assert;
     
    88import org.eclipse.jface.text.source.ISourceViewer;
    99import org.eclipse.swt.custom.StyledText;
     10import org.refal.plus.rfpdt.editor.RfpEditor;
     11import org.refal.plus.rfpdt.editor.RfpEditorMessages;
    1012
    1113public class GotoMatchingBracketAction extends Action {
     
    3234            return;
    3335        StyledText text = sourceViewer.getTextWidget();
    34         IRegion region = editor.bracketMatcher.match(document, editor.widgetOffset2ModelOffset(text.getCaretOffset()));
     36        IRegion region = editor.getBracketMatcher().match(document, editor.widgetOffset2ModelOffset(text.getCaretOffset()));
    3537        if (region == null) {
    3638            editor.statusLineErrorMessage(RfpEditorMessages.GotoMatchingBracket_error_noMatchingBracket);
     
    4244        if (length < 1)
    4345            return;
    44         int anchor = editor.bracketMatcher.getAnchor();
     46        int anchor = editor.getBracketMatcher().getAnchor();
    4547        int targetOffset = (ICharacterPairMatcher.RIGHT == anchor) ? offset + 1 : offset + length;
    4648        sourceViewer.setSelectedRange(targetOffset, 0);
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/ui/actions/IRfpEditorActionDefinitionIds.java

    r3501 r3503  
    1 package org.refal.plus.rfpdt.editor;
     1package org.refal.plus.rfpdt.ui.actions;
    22
    33import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/ui/actions/IndentAction.java

    r3501 r3503  
    1 package org.refal.plus.rfpdt.editor;
     1package org.refal.plus.rfpdt.ui.actions;
    22
    33import org.eclipse.core.runtime.IStatus;
     
    2020import org.eclipse.ui.texteditor.IDocumentProvider;
    2121import org.refal.plus.rfpdt.core.RfpCorePlugin;
     22import org.refal.plus.rfpdt.editor.Document;
     23import org.refal.plus.rfpdt.editor.RfpAutoIndentStrategy;
     24import org.refal.plus.rfpdt.editor.RfpEditor;
    2225
    2326public class IndentAction implements IEditorActionDelegate {
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/ui/actions/RetargettableActionAdapterFactory.java

    r3501 r3503  
    1 package org.refal.plus.rfpdt.editor;
     1package org.refal.plus.rfpdt.ui.actions;
    22
    33import org.eclipse.core.runtime.IAdapterFactory;
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/ui/actions/RfpEditorActionContributor.java

    r3501 r3503  
    1 package org.refal.plus.rfpdt.editor;
     1package org.refal.plus.rfpdt.ui.actions;
    22
    33import org.eclipse.jface.action.IMenuManager;
     
    77import org.eclipse.ui.texteditor.ITextEditor;
    88import org.eclipse.ui.texteditor.RetargetTextEditorAction;
     9import org.refal.plus.rfpdt.editor.RfpEditorMessages;
    910
    1011public class RfpEditorActionContributor extends BasicTextEditorActionContributor {
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/ui/actions/ToggleBreakpointAdapter.java

    r3501 r3503  
    1 package org.refal.plus.rfpdt.editor;
     1package org.refal.plus.rfpdt.ui.actions;
    22
    33import java.util.HashMap;
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.ui/src/org/refal/plus/rfpdt/ui/actions/ToggleCommentAction.java

    r3501 r3503  
    44 */
    55
    6 package org.refal.plus.rfpdt.editor;
     6package org.refal.plus.rfpdt.ui.actions;
    77
    88import org.eclipse.jface.action.Action;
     
    2222import org.eclipse.ui.IEditorPart;
    2323import org.refal.plus.rfpdt.core.RfpCorePlugin;
     24import org.refal.plus.rfpdt.editor.RfpEditor;
    2425
    2526public class ToggleCommentAction extends Action implements IEditorActionDelegate {
Note: See TracChangeset for help on using the changeset viewer.