You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by jo...@apache.org on 2011/08/01 16:38:36 UTC

svn commit: r1152804 [10/15] - in /uima/sandbox/trunk/TextMarker: org.apache.uima.tm.dltk.debug.ui/ org.apache.uima.tm.dltk.debug.ui/META-INF/ org.apache.uima.tm.dltk.debug.ui/bin/ org.apache.uima.tm.dltk.debug.ui/icons/ org.apache.uima.tm.dltk.debug.u...

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorColoringConfigurationBlock.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorColoringConfigurationBlock.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorColoringConfigurationBlock.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorColoringConfigurationBlock.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,110 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import java.io.InputStream;
+
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.apache.uima.tm.dltk.internal.ui.editor.TextMarkerDocumentSetupParticipant;
+import org.apache.uima.tm.dltk.internal.ui.text.SimpleTextMarkerSourceViewerConfiguration;
+import org.apache.uima.tm.dltk.ui.TextMarkerPreferenceConstants;
+import org.apache.uima.tm.dltk.ui.text.TextMarkerPartitions;
+import org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer;
+import org.eclipse.dltk.ui.preferences.AbstractScriptEditorColoringConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+import org.eclipse.dltk.ui.preferences.PreferencesMessages;
+import org.eclipse.dltk.ui.text.IColorManager;
+import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;
+import org.eclipse.dltk.ui.text.ScriptTextTools;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.IOverviewRuler;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+public class TextMarkerEditorColoringConfigurationBlock extends
+        AbstractScriptEditorColoringConfigurationBlock implements IPreferenceConfigurationBlock {
+
+  private static final String PREVIEW_FILE_NAME = "PreviewFile.txt";
+
+  private static final String[][] fSyntaxColorListModel = new String[][] {
+      { PreferencesMessages.DLTKEditorPreferencePage_singleLineComment,
+          TextMarkerPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR, sCommentsCategory },
+      { PreferencesMessages.DLTKEditorPreferencePage_CommentTaskTags,
+          TextMarkerPreferenceConstants.COMMENT_TASK_TAGS, sCommentsCategory },
+      { PreferencesMessages.DLTKEditorPreferencePage_strings,
+          TextMarkerPreferenceConstants.EDITOR_STRING_COLOR, sCoreCategory },
+
+      { PreferencesMessages.DLTKEditorPreferencePage_numbers,
+          TextMarkerPreferenceConstants.EDITOR_NUMBER_COLOR, sCoreCategory },
+      { TextMarkerPreferencesMessages.TextMarkerEditorPreferencePage_condition_colors,
+          TextMarkerPreferenceConstants.EDITOR_CONDITION_COLOR, sCoreCategory },
+
+      { TextMarkerPreferencesMessages.TextMarkerEditorPreferencePage_action_colors,
+          TextMarkerPreferenceConstants.EDITOR_ACTION_COLOR, sCoreCategory },
+
+      { TextMarkerPreferencesMessages.TextMarkerEditorPreferencePage_declaration_colors,
+          TextMarkerPreferenceConstants.EDITOR_DECLARATION_DEFINITION_COLOR, sCoreCategory },
+
+      { TextMarkerPreferencesMessages.TextMarkerEditorPreferencePage_basicsymbols_colors,
+          TextMarkerPreferenceConstants.EDITOR_BASICSYMBOL_DEFINITION_COLOR, sCoreCategory },
+
+      { TextMarkerPreferencesMessages.TextMarkerEditorPreferencePage_function_colors,
+          TextMarkerPreferenceConstants.EDITOR_FUNCTION_COLOR, sCoreCategory },
+
+      { TextMarkerPreferencesMessages.TextMarkerEditorPreferencePage_then_colors,
+          TextMarkerPreferenceConstants.EDITOR_THEN_COLOR, sCoreCategory },
+
+      { TextMarkerPreferencesMessages.TodoTaskDescription,// .
+          // DLTKEditorPreferencePage_CommentTaskTags
+          // ,
+          TextMarkerPreferenceConstants.COMMENT_TASK_TAGS, sCommentsCategory }
+  /*
+   * { PreferencesMessages.DLTKEditorPreferencePage_variables,
+   * TextMarkerPreferenceConstants.EDITOR_VARIABLE_COLOR, sCoreCategory }
+   */};
+
+  public TextMarkerEditorColoringConfigurationBlock(OverlayPreferenceStore store) {
+    super(store);
+  }
+
+  @Override
+  protected String[][] getSyntaxColorListModel() {
+    return fSyntaxColorListModel;
+  }
+
+  @Override
+  protected ProjectionViewer createPreviewViewer(Composite parent, IVerticalRuler verticalRuler,
+          IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles,
+          IPreferenceStore store) {
+    return new ScriptSourceViewer(parent, verticalRuler, overviewRuler, showAnnotationsOverview,
+            styles, store);
+  }
+
+  @Override
+  protected ScriptSourceViewerConfiguration createSimpleSourceViewerConfiguration(
+          IColorManager colorManager, IPreferenceStore preferenceStore, ITextEditor editor,
+          boolean configureFormatter) {
+    return new SimpleTextMarkerSourceViewerConfiguration(colorManager, preferenceStore, editor,
+            TextMarkerPartitions.TM_PARTITIONING, configureFormatter);
+  }
+
+  @Override
+  protected void setDocumentPartitioning(IDocument document) {
+    TextMarkerDocumentSetupParticipant participant = new TextMarkerDocumentSetupParticipant();
+    participant.setup(document);
+  }
+
+  @Override
+  protected InputStream getPreviewContentReader() {
+    return getClass().getResourceAsStream(PREVIEW_FILE_NAME);
+  }
+
+  @Override
+  protected ScriptTextTools getTextTools() {
+    return TextMarkerUI.getDefault().getTextTools();
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorColoringConfigurationBlock.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorColoringConfigurationBlock.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorHoverPreferencePage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorHoverPreferencePage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorHoverPreferencePage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorHoverPreferencePage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,59 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.apache.uima.tm.dltk.core.TextMarkerNature;
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;
+import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+import org.eclipse.dltk.ui.preferences.PreferencesMessages;
+import org.eclipse.dltk.ui.preferences.ScriptEditorHoverConfigurationBlock;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+
+public class TextMarkerEditorHoverPreferencePage extends AbstractConfigurationBlockPreferencePage {
+
+  /*
+   * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()
+   */
+  @Override
+  protected String getHelpId() {
+
+    return null;
+  }
+
+  /*
+   * @see
+   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()
+   */
+  @Override
+  protected void setDescription() {
+    String description = PreferencesMessages.DLTKEditorPreferencePage_hoverTab_title;
+    setDescription(description);
+  }
+
+  /*
+   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#
+   * setPreferenceStore()
+   */
+  @Override
+  protected void setPreferenceStore() {
+    setPreferenceStore(TextMarkerUI.getDefault().getPreferenceStore());
+  }
+
+  @Override
+  protected Label createDescriptionLabel(Composite parent) {
+    return null; // no description for new look.
+  }
+
+  /*
+   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#
+   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)
+   */
+  @Override
+  protected IPreferenceConfigurationBlock createConfigurationBlock(
+          OverlayPreferenceStore overlayPreferenceStore) {
+    return new ScriptEditorHoverConfigurationBlock(this, overlayPreferenceStore,
+            TextMarkerNature.NATURE_ID);
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorHoverPreferencePage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorHoverPreferencePage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorPreferencesPage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorPreferencesPage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorPreferencesPage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorPreferencesPage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,55 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;
+import org.eclipse.dltk.ui.preferences.EditorConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+
+public class TextMarkerEditorPreferencesPage extends AbstractConfigurationBlockPreferencePage {
+
+  /*
+   * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()
+   */
+  @Override
+  protected String getHelpId() {
+    return "";
+  }
+
+  /*
+   * @see
+   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()
+   */
+  @Override
+  protected void setDescription() {
+    String description = TextMarkerPreferencesMessages.TextMarkerEditorPreferencePage_general;
+    setDescription(description);
+  }
+
+  @Override
+  protected Label createDescriptionLabel(Composite parent) {
+    return null;
+  }
+
+  /*
+   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#
+   * setPreferenceStore()
+   */
+  @Override
+  protected void setPreferenceStore() {
+    setPreferenceStore(TextMarkerUI.getDefault().getPreferenceStore());
+  }
+
+  /*
+   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#
+   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)
+   */
+  @Override
+  protected IPreferenceConfigurationBlock createConfigurationBlock(
+          OverlayPreferenceStore overlayPreferenceStore) {
+    return new EditorConfigurationBlock(this, overlayPreferenceStore);
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorPreferencesPage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorPreferencesPage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorSyntaxColoringPreferencePage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorSyntaxColoringPreferencePage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorSyntaxColoringPreferencePage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorSyntaxColoringPreferencePage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,56 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;
+import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+import org.eclipse.dltk.ui.preferences.PreferencesMessages;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+
+public class TextMarkerEditorSyntaxColoringPreferencePage extends
+        AbstractConfigurationBlockPreferencePage {
+
+  /*
+   * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()
+   */
+  @Override
+  protected String getHelpId() {
+    return "";
+  }
+
+  /*
+   * @see
+   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()
+   */
+  @Override
+  protected void setDescription() {
+    String description = PreferencesMessages.DLTKEditorPreferencePage_colors;
+    setDescription(description);
+  }
+
+  @Override
+  protected Label createDescriptionLabel(Composite parent) {
+    return null;
+  }
+
+  /*
+   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#
+   * setPreferenceStore()
+   */
+  @Override
+  protected void setPreferenceStore() {
+    setPreferenceStore(TextMarkerUI.getDefault().getPreferenceStore());
+  }
+
+  /*
+   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#
+   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)
+   */
+  @Override
+  protected IPreferenceConfigurationBlock createConfigurationBlock(
+          OverlayPreferenceStore overlayPreferenceStore) {
+    return new TextMarkerEditorColoringConfigurationBlock(overlayPreferenceStore);
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorSyntaxColoringPreferencePage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerEditorSyntaxColoringPreferencePage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingConfigurationBlock.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingConfigurationBlock.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingConfigurationBlock.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingConfigurationBlock.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,20 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.apache.uima.tm.dltk.internal.ui.text.folding.TextMarkerFoldingPreferenceBlock;
+import org.eclipse.dltk.ui.preferences.FoldingConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+import org.eclipse.dltk.ui.text.folding.IFoldingPreferenceBlock;
+import org.eclipse.jface.preference.PreferencePage;
+
+
+public class TextMarkerFoldingConfigurationBlock extends FoldingConfigurationBlock {
+
+  public TextMarkerFoldingConfigurationBlock(OverlayPreferenceStore store, PreferencePage p) {
+    super(store, p);
+  }
+
+  @Override
+  protected IFoldingPreferenceBlock createFoldingPreferenceBlock() {
+    return new TextMarkerFoldingPreferenceBlock(fStore, getPreferencePage());
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingConfigurationBlock.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingConfigurationBlock.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingPreferencePage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingPreferencePage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingPreferencePage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingPreferencePage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,59 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;
+import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+import org.eclipse.dltk.ui.preferences.PreferencesMessages;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+
+/**
+ * The page for setting the editor options.
+ */
+public final class TextMarkerFoldingPreferencePage extends AbstractConfigurationBlockPreferencePage {
+
+  /*
+   * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()
+   */
+  @Override
+  protected String getHelpId() {
+    // return IScriptHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE;
+    return null;
+  }
+
+  /*
+   * @see
+   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()
+   */
+  @Override
+  protected void setDescription() {
+    String description = PreferencesMessages.EditorPreferencePage_folding_title;
+    setDescription(description);
+  }
+
+  /*
+   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#
+   * setPreferenceStore()
+   */
+  @Override
+  protected void setPreferenceStore() {
+    setPreferenceStore(TextMarkerUI.getDefault().getPreferenceStore());
+  }
+
+  @Override
+  protected Label createDescriptionLabel(Composite parent) {
+    return null; // no description for new look.
+  }
+
+  /*
+   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#
+   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)
+   */
+  @Override
+  protected IPreferenceConfigurationBlock createConfigurationBlock(
+          OverlayPreferenceStore overlayPreferenceStore) {
+    return new TextMarkerFoldingConfigurationBlock(overlayPreferenceStore, this);
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingPreferencePage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFoldingPreferencePage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFormatterPreferencePage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFormatterPreferencePage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFormatterPreferencePage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFormatterPreferencePage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,63 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.apache.uima.tm.dltk.core.TextMarkerNature;
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.apache.uima.tm.dltk.internal.ui.text.SimpleTextMarkerSourceViewerConfiguration;
+import org.apache.uima.tm.dltk.ui.TextMarkerPreferenceConstants;
+import org.apache.uima.tm.dltk.ui.text.TextMarkerPartitions;
+import org.eclipse.dltk.ui.formatter.AbstractFormatterPreferencePage;
+import org.eclipse.dltk.ui.preferences.PreferenceKey;
+import org.eclipse.dltk.ui.text.IColorManager;
+import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+/**
+ * Preference page for TextMarker debugging engines
+ */
+public class TextMarkerFormatterPreferencePage extends AbstractFormatterPreferencePage {
+
+  private static final PreferenceKey FORMATTER = new PreferenceKey(TextMarkerUI.PLUGIN_ID,
+          TextMarkerPreferenceConstants.FORMATTER_ID);
+
+  @Override
+  protected String getNatureId() {
+    return TextMarkerNature.NATURE_ID;
+  }
+
+  @Override
+  protected PreferenceKey getFormatterPreferenceKey() {
+    return FORMATTER;
+  }
+
+  @Override
+  protected IDialogSettings getDialogSettings() {
+    return TextMarkerUI.getDefault().getDialogSettings();
+  }
+
+  @Override
+  protected String getPreferencePageId() {
+    return "org.apache.uima.tm.dltk.preferences.formatter"; //$NON-NLS-1$
+  }
+
+  @Override
+  protected String getPropertyPageId() {
+    return "org.apache.uima.tm.dltk.propertyPage.formatter"; //$NON-NLS-1$
+  }
+
+  @Override
+  protected ScriptSourceViewerConfiguration createSimpleSourceViewerConfiguration(
+          IColorManager colorManager, IPreferenceStore preferenceStore, ITextEditor editor,
+          boolean configureFormatter) {
+    return new SimpleTextMarkerSourceViewerConfiguration(colorManager, preferenceStore, editor,
+            TextMarkerPartitions.TM_PARTITIONING, configureFormatter);
+  }
+
+  @Override
+  protected void setPreferenceStore() {
+    setPreferenceStore(TextMarkerUI.getDefault().getPreferenceStore());
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFormatterPreferencePage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerFormatterPreferencePage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalConfigurationBlock.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalConfigurationBlock.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalConfigurationBlock.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalConfigurationBlock.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,26 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class TextMarkerGlobalConfigurationBlock extends AbstractConfigurationBlock {
+
+  public TextMarkerGlobalConfigurationBlock(OverlayPreferenceStore store,
+          PreferencePage mainPreferencePage) {
+    super(store, mainPreferencePage);
+  }
+
+  public Control createControl(Composite parent) {
+    initializeDialogUnits(parent);
+
+    Composite composite = new Composite(parent, SWT.NONE);
+    composite.setLayout(new GridLayout());
+
+    return composite;
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalConfigurationBlock.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalConfigurationBlock.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalPreferencePage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalPreferencePage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalPreferencePage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalPreferencePage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,33 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;
+import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+
+
+public class TextMarkerGlobalPreferencePage extends AbstractConfigurationBlockPreferencePage {
+
+  @Override
+  protected IPreferenceConfigurationBlock createConfigurationBlock(
+          OverlayPreferenceStore overlayPreferenceStore) {
+    return new TextMarkerGlobalConfigurationBlock(overlayPreferenceStore, this);
+  }
+
+  @Override
+  protected String getHelpId() {
+    return null;
+  }
+
+  @Override
+  protected void setDescription() {
+    String description = TextMarkerPreferencesMessages.TextMarkerGlobalPreferencePage_description;
+    setDescription(description);
+  }
+
+  @Override
+  protected void setPreferenceStore() {
+    setPreferenceStore(TextMarkerUI.getDefault().getPreferenceStore());
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalPreferencePage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerGlobalPreferencePage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,57 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class TextMarkerPreferencesMessages extends NLS {
+  private static final String BUNDLE_NAME = "org.apache.uima.tm.dltk.internal.ui.preferences.TextMarkerPreferencesMessages";//$NON-NLS-1$	
+
+  private TextMarkerPreferencesMessages() {
+    // Do not instantiate
+  }
+
+  static {
+    NLS.initializeMessages(BUNDLE_NAME, TextMarkerPreferencesMessages.class);
+  }
+
+  public static String TextMarkerGlobalPreferencePage_description;
+
+  public static String TextMarkerEditorPreferencePage_general;
+
+  public static String TextMarkerSmartTypingConfigurationBlock_typing_smartTab;
+
+  public static String TextMarkerSmartTypingConfigurationBlock_closeBrackets;
+
+  public static String TextMarkerSmartTypingConfigurationBlock_closeStrings;
+
+  public static String TextMarkerSmartTypingConfigurationBlock_closeBraces;
+
+  public static String TextMarkerSmartTypingConfigurationBlock_typing_tabTitle;
+
+  public static String TextMarkerEditorPreferencePage_condition_colors;
+
+  public static String TextMarkerEditorPreferencePage_action_colors;
+
+  public static String TextMarkerEditorPreferencePage_declaration_colors;
+
+  public static String TextMarkerEditorPreferencePage_basicsymbols_colors;
+
+  public static String TextMarkerEditorPreferencePage_function_colors;
+
+  public static String TextMarkerEditorPreferencePage_then_colors;
+
+  public static String TextMarkerSmartTypingConfigurationBlock_smartPaste_full;
+
+  public static String TextMarkerSmartTypingConfigurationBlock_smartPaste_simple;
+
+  public static String TextMarkerSmartTypingConfigurationBlock_tabs_title;
+
+  public static String TextMarkerSmartTypingConfigurationBlock_autoclose_title;
+
+  public static String TodoTaskDescription;
+
+  public static String BuilderResolveImports;
+
+  public static String BuilderImportByName;
+
+  public static String BuilderIgnoreDuplicateShortnames;
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.properties
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.properties?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.properties (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.properties Mon Aug  1 14:37:34 2011
@@ -0,0 +1,23 @@
+TextMarkerSmartTypingConfigurationBlock_autoclose_title =Automatically close
+TextMarkerSmartTypingConfigurationBlock_tabs_title =Tabulators
+TextMarkerGlobalPreferencePage_description=General TextMarker settings
+TextMarkerSmartTypingConfigurationBlock_smartPaste_simple =Shift inserted block to insertion point level
+TextMarkerSmartTypingConfigurationBlock_smartPaste_full =Adjust indentation(fully reindents block)
+TextMarkerSmartTypingConfigurationBlock_typing_smartTab =Tab key indents the current line
+TextMarkerSmartTypingConfigurationBlock_closeBrackets =(Parentheses),[square] brackets
+TextMarkerSmartTypingConfigurationBlock_closeBraces ={Braces}
+TextMarkerSmartTypingConfigurationBlock_closeStrings ="Strings"
+TextMarkerSmartTypingConfigurationBlock_typing_tabTitle =TextMarkerSmartTypingConfigurationBlock_typing_tabTitle
+TextMarkerEditorPreferencePage_general=Appeara&nce
+TextMarkerEditorPreferencePage_condition_colors = Condition
+TextMarkerEditorPreferencePage_action_colors = Action
+TextMarkerEditorPreferencePage_declaration_colors = Declaration
+TextMarkerEditorPreferencePage_basicsymbols_colors = Basic Symbol
+TextMarkerEditorPreferencePage_function_colors = Function
+TextMarkerEditorPreferencePage_then_colors = then (the action indicator)
+TextMarkerSmartTypingConfigurationBlock_typing_tabTitle =TextMarkerSmartTypingConfigurationBlock_typing_tabTitle
+
+TodoTaskDescription = Strings indicating tasks in TextMarker comments.
+BuilderResolveImports = Resolve imports when creating descriptors.
+BuilderImportByName = Use import by name when creating descriptors.
+BuilderIgnoreDuplicateShortnames = Hide warnings for conflicting short names of types.

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.properties
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPreferencesMessages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPropertyPage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPropertyPage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPropertyPage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPropertyPage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,15 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.dialogs.PropertyPage;
+
+public class TextMarkerPropertyPage extends PropertyPage {
+
+  @Override
+  protected Control createContents(Composite parent) {
+    return new Composite(parent, SWT.NONE);
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPropertyPage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerPropertyPage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingConfigurationBlock.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingConfigurationBlock.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingConfigurationBlock.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingConfigurationBlock.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,207 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.apache.uima.tm.dltk.ui.TextMarkerPreferenceConstants;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.dltk.internal.corext.util.Messages;
+import org.eclipse.dltk.ui.CodeFormatterConstants;
+import org.eclipse.dltk.ui.PreferenceConstants;
+import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+import org.eclipse.dltk.ui.preferences.PreferencesMessages;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+
+/**
+ * Configures Editor typing preferences.
+ */
+class TextMarkerSmartTypingConfigurationBlock extends AbstractConfigurationBlock {
+
+  public TextMarkerSmartTypingConfigurationBlock(OverlayPreferenceStore store) {
+    super(store);
+
+    store.addKeys(createOverlayStoreKeys());
+  }
+
+  private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys() {
+
+    List keys = new ArrayList();
+
+    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+            PreferenceConstants.EDITOR_CLOSE_STRINGS));
+    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+            PreferenceConstants.EDITOR_CLOSE_BRACKETS));
+    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+            PreferenceConstants.EDITOR_CLOSE_BRACES));
+    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+            PreferenceConstants.EDITOR_SMART_TAB));
+    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,
+            TextMarkerPreferenceConstants.EDITOR_SMART_PASTE_MODE));
+
+    return (OverlayPreferenceStore.OverlayKey[]) keys
+            .toArray(new OverlayPreferenceStore.OverlayKey[keys.size()]);
+  }
+
+  public Control createControl(Composite parent) {
+    Composite control = new Composite(parent, SWT.NONE);
+    GridLayout layout = new GridLayout();
+    control.setLayout(layout);
+
+    Composite composite = createSubsection(control, null,
+            TextMarkerPreferencesMessages.TextMarkerSmartTypingConfigurationBlock_autoclose_title);
+    addAutoclosingSection(composite);
+
+    composite = createSubsection(control, null,
+            TextMarkerPreferencesMessages.TextMarkerSmartTypingConfigurationBlock_tabs_title);
+    addTabSection(composite);
+
+    composite = createSubsection(control, null,
+            PreferencesMessages.SmartTypingConfigurationBlock_pasting_title);
+    addPasteSection(composite);
+
+    return control;
+  }
+
+  private void addPasteSection(Composite composite) {
+    GridLayout layout = new GridLayout();
+    composite.setLayout(layout);
+
+    String label = null;
+
+    label = TextMarkerPreferencesMessages.TextMarkerSmartTypingConfigurationBlock_smartPaste_simple;
+    addRadioButton(composite, label, TextMarkerPreferenceConstants.EDITOR_SMART_PASTE_MODE,
+            TextMarkerPreferenceConstants.EDITOR_SMART_PASTE_MODE_SIMPLE);
+
+    label = TextMarkerPreferencesMessages.TextMarkerSmartTypingConfigurationBlock_smartPaste_full;
+    addRadioButton(composite, label, TextMarkerPreferenceConstants.EDITOR_SMART_PASTE_MODE,
+            TextMarkerPreferenceConstants.EDITOR_SMART_PASTE_MODE_FULL);
+
+  }
+
+  private void addTabSection(Composite composite) {
+    GridLayout layout = new GridLayout();
+    composite.setLayout(layout);
+
+    String label;
+    label = TextMarkerPreferencesMessages.TextMarkerSmartTypingConfigurationBlock_typing_smartTab;
+    addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_TAB, 0);
+
+    createMessage(composite);
+  }
+
+  private void addAutoclosingSection(Composite composite) {
+    GridLayout layout = new GridLayout();
+    layout.numColumns = 1;
+    composite.setLayout(layout);
+
+    String label;
+
+    label = TextMarkerPreferencesMessages.TextMarkerSmartTypingConfigurationBlock_closeStrings;
+    addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_STRINGS, 0);
+
+    label = TextMarkerPreferencesMessages.TextMarkerSmartTypingConfigurationBlock_closeBrackets;
+    addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_BRACKETS, 0);
+
+    label = TextMarkerPreferencesMessages.TextMarkerSmartTypingConfigurationBlock_closeBraces;
+    addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_BRACES, 0);
+  }
+
+  private void createMessage(final Composite composite) {
+    // TODO create a link with an argument, so the formatter preference page
+    // can open the
+    // current profile automatically.
+    String linkTooltip = PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tooltip;
+    String text;
+    String indentMode = TextMarkerUI.getDefault().getPreferenceStore().getString(
+            CodeFormatterConstants.FORMATTER_TAB_CHAR);
+    if (CodeFormatterConstants.TAB.equals(indentMode))
+      text = Messages.format(
+              PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tab_text,
+              new String[] { Integer.toString(getTabDisplaySize()) });
+    else
+      text = Messages.format(
+              PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_others_text,
+              new String[] { Integer.toString(getTabDisplaySize()), getIndentMode() });
+
+    final Link link = new Link(composite, SWT.NONE);
+    link.setText(text);
+    link.setToolTipText(linkTooltip);
+    GridData gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
+    gd.widthHint = 300; // don't get wider initially
+    link.setLayoutData(gd);
+    link.addSelectionListener(new SelectionAdapter() {
+      @Override
+      public void widgetSelected(SelectionEvent e) {
+        PreferencesUtil.createPreferenceDialogOn(link.getShell(),
+                "org.apache.uima.tm.dltk.ui.EditorPreferences", null, null); //$NON-NLS-1$
+      }
+    });
+
+    final IPreferenceStore combinedStore = getPreferenceStore();
+    final IPropertyChangeListener propertyChangeListener = new IPropertyChangeListener() {
+      private boolean fHasRun = false;
+
+      public void propertyChange(PropertyChangeEvent event) {
+        if (fHasRun)
+          return;
+        if (composite.isDisposed())
+          return;
+        String property = event.getProperty();
+        if (CodeFormatterConstants.FORMATTER_TAB_CHAR.equals(property)
+                || CodeFormatterConstants.FORMATTER_TAB_SIZE.equals(property)) {
+          fHasRun = true;
+          link.dispose();
+          createMessage(composite);
+          Dialog.applyDialogFont(composite);
+          composite.redraw();
+          composite.layout();
+        }
+      }
+    };
+    combinedStore.addPropertyChangeListener(propertyChangeListener);
+    link.addDisposeListener(new DisposeListener() {
+      public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e) {
+        combinedStore.removePropertyChangeListener(propertyChangeListener);
+      }
+    });
+  }
+
+  private String getIndentMode() {
+    String indentMode = TextMarkerUI.getDefault().getPreferenceStore().getString(
+            CodeFormatterConstants.FORMATTER_TAB_CHAR);
+
+    if (CodeFormatterConstants.SPACE.equals(indentMode))
+      return PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_spaces;
+
+    if (CodeFormatterConstants.TAB.equals(indentMode))
+      return PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tabs;
+
+    if (CodeFormatterConstants.MIXED.equals(indentMode))
+      return PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tabsAndSpaces;
+
+    Assert.isTrue(false, "Illegal indent mode - must not happen"); //$NON-NLS-1$
+    return null;
+  }
+
+  private int getTabDisplaySize() {
+    return TextMarkerUI.getDefault().getPreferenceStore().getInt(
+            CodeFormatterConstants.FORMATTER_TAB_SIZE);
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingConfigurationBlock.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingConfigurationBlock.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingPreferencePage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingPreferencePage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingPreferencePage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingPreferencePage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,52 @@
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;
+import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
+import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+
+public class TextMarkerSmartTypingPreferencePage extends AbstractConfigurationBlockPreferencePage {
+
+  /*
+   * @see
+   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()
+   */
+  @Override
+  protected void setDescription() {
+    String description = TextMarkerPreferencesMessages.TextMarkerSmartTypingConfigurationBlock_typing_tabTitle;
+    setDescription(description);
+  }
+
+  /*
+   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#
+   * setPreferenceStore()
+   */
+  @Override
+  protected void setPreferenceStore() {
+    setPreferenceStore(TextMarkerUI.getDefault().getPreferenceStore());
+  }
+
+  @Override
+  protected Label createDescriptionLabel(Composite parent) {
+    return null; // no description for new look.
+  }
+
+  /*
+   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#
+   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)
+   */
+  @Override
+  protected IPreferenceConfigurationBlock createConfigurationBlock(
+          OverlayPreferenceStore overlayPreferenceStore) {
+    return new TextMarkerSmartTypingConfigurationBlock(overlayPreferenceStore);
+  }
+
+  @Override
+  protected String getHelpId() {
+    return "";
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingPreferencePage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerSmartTypingPreferencePage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerTodoTaskPreferencePage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerTodoTaskPreferencePage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerTodoTaskPreferencePage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerTodoTaskPreferencePage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,110 @@
+/**
+ * 
+ */
+package org.apache.uima.tm.dltk.internal.ui.preferences;
+
+import org.apache.uima.tm.dltk.core.TextMarkerNature;
+import org.apache.uima.tm.dltk.core.TextMarkerPlugin;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.dltk.ui.PreferencesAdapter;
+import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage;
+import org.eclipse.dltk.ui.preferences.AbstractOptionsBlock;
+import org.eclipse.dltk.ui.preferences.AbstractTodoTaskOptionsBlock;
+import org.eclipse.dltk.ui.preferences.PreferenceKey;
+import org.eclipse.dltk.ui.util.IStatusChangeListener;
+import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+
+
+/**
+ * @author Martin Toepfer
+ * 
+ */
+public class TextMarkerTodoTaskPreferencePage extends
+        AbstractConfigurationBlockPropertyAndPreferencePage {
+
+  static final PreferenceKey CASE_SENSITIVE = AbstractTodoTaskOptionsBlock
+          .createCaseSensitiveKey(TextMarkerPlugin.PLUGIN_ID);
+
+  static final PreferenceKey ENABLED = AbstractTodoTaskOptionsBlock
+          .createEnabledKey(TextMarkerPlugin.PLUGIN_ID);
+
+  static final PreferenceKey TAGS = AbstractTodoTaskOptionsBlock
+          .createTagKey(TextMarkerPlugin.PLUGIN_ID);
+
+  protected PreferenceKey[] getPreferenceKeys() {
+    return new PreferenceKey[] { TAGS, ENABLED, CASE_SENSITIVE };
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage #getHelpId()
+   */
+  @Override
+  protected String getHelpId() {
+    return null;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage #setDescription()
+   */
+  @Override
+  protected void setDescription() {
+    setDescription(TextMarkerPreferencesMessages.TodoTaskDescription);
+  }
+
+  protected Preferences getPluginPreferences() {
+    return TextMarkerPlugin.getDefault().getPluginPreferences();
+  }
+
+  @Override
+  protected AbstractOptionsBlock createOptionsBlock(IStatusChangeListener newStatusChangedListener,
+          IProject project, IWorkbenchPreferenceContainer container) {
+    return new AbstractTodoTaskOptionsBlock(newStatusChangedListener, project, getPreferenceKeys(),
+            container) {
+      @Override
+      protected PreferenceKey getTags() {
+        return TAGS;
+      }
+
+      @Override
+      protected PreferenceKey getEnabledKey() {
+        return ENABLED;
+      }
+
+      @Override
+      protected PreferenceKey getCaseSensitiveKey() {
+        return CASE_SENSITIVE;
+      }
+    };
+  }
+
+  @Override
+  protected String getNatureId() {
+    return TextMarkerNature.NATURE_ID;
+  }
+
+  @Override
+  protected String getProjectHelpId() {
+    return null;
+  }
+
+  @Override
+  protected void setPreferenceStore() {
+    setPreferenceStore(new PreferencesAdapter(TextMarkerPlugin.getDefault().getPluginPreferences()));
+  }
+
+  @Override
+  protected String getPreferencePageId() {
+    return "org.apache.uima.tm.dltk.preferences.todo";
+  }
+
+  @Override
+  protected String getPropertyPageId() {
+    return "org.apache.uima.tm.dltk.propertyPage.todo";
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerTodoTaskPreferencePage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/TextMarkerTodoTaskPreferencePage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/messages.properties
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/messages.properties?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/messages.properties (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/messages.properties Mon Aug  1 14:37:34 2011
@@ -0,0 +1 @@
+TextMarkerFormatterPreferencePage_description=TextMarker Formatter Selection

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/messages.properties
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/preferences/messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/search/TextMarkerSearchPage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/search/TextMarkerSearchPage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/search/TextMarkerSearchPage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/search/TextMarkerSearchPage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,13 @@
+package org.apache.uima.tm.dltk.internal.ui.search;
+
+import org.apache.uima.tm.dltk.core.TextMarkerLanguageToolkit;
+import org.eclipse.dltk.core.IDLTKLanguageToolkit;
+import org.eclipse.dltk.ui.search.ScriptSearchPage;
+
+
+public class TextMarkerSearchPage extends ScriptSearchPage {
+  @Override
+  protected IDLTKLanguageToolkit getLanguageToolkit() {
+    return TextMarkerLanguageToolkit.getDefault();
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/search/TextMarkerSearchPage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/search/TextMarkerSearchPage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerCodeTemplatesPreferencePage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerCodeTemplatesPreferencePage.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerCodeTemplatesPreferencePage.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerCodeTemplatesPreferencePage.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,57 @@
+package org.apache.uima.tm.dltk.internal.ui.templates;
+
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.apache.uima.tm.dltk.internal.ui.text.SimpleTextMarkerSourceViewerConfiguration;
+import org.apache.uima.tm.dltk.internal.ui.text.TextMarkerTextTools;
+import org.apache.uima.tm.dltk.ui.text.TextMarkerPartitions;
+import org.eclipse.dltk.ui.templates.ScriptTemplateAccess;
+import org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage;
+import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;
+import org.eclipse.jface.text.IDocument;
+
+
+/**
+ * TextMarker code templates preference page
+ */
+public class TextMarkerCodeTemplatesPreferencePage extends ScriptTemplatePreferencePage {
+
+  /*
+   * @see
+   * org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#createSourceViewerConfiguration()
+   */
+  @Override
+  protected ScriptSourceViewerConfiguration createSourceViewerConfiguration() {
+    return new SimpleTextMarkerSourceViewerConfiguration(getTextTools().getColorManager(),
+            getPreferenceStore(), null, TextMarkerPartitions.TM_PARTITIONING, false);
+  }
+
+  /*
+   * @see
+   * org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#setDocumentParticioner(org.eclipse
+   * .jface.text.IDocument)
+   */
+  @Override
+  protected void setDocumentParticioner(IDocument document) {
+    getTextTools().setupDocumentPartitioner(document, TextMarkerPartitions.TM_PARTITIONING);
+  }
+
+  /*
+   * @see org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#setPreferenceStore()
+   */
+  @Override
+  protected void setPreferenceStore() {
+    setPreferenceStore(TextMarkerUI.getDefault().getPreferenceStore());
+  }
+
+  /*
+   * @see org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#getTemplateAccess()
+   */
+  @Override
+  protected ScriptTemplateAccess getTemplateAccess() {
+    return TextMarkerTemplateAccess.getInstance();
+  }
+
+  private TextMarkerTextTools getTextTools() {
+    return TextMarkerUI.getDefault().getTextTools();
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerCodeTemplatesPreferencePage.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerCodeTemplatesPreferencePage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateAccess.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateAccess.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateAccess.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateAccess.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,48 @@
+package org.apache.uima.tm.dltk.internal.ui.templates;
+
+import org.apache.uima.tm.dltk.internal.ui.TextMarkerUI;
+import org.eclipse.dltk.ui.templates.ScriptTemplateAccess;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+
+/**
+ * Provides access to TextMarker template store.
+ */
+public class TextMarkerTemplateAccess extends ScriptTemplateAccess {
+  // Template
+  private static final String CUSTOM_TEMPLATES_KEY = "org.eclipse.textmarker.Templates";
+
+  private static TextMarkerTemplateAccess instance;
+
+  public static TextMarkerTemplateAccess getInstance() {
+    if (instance == null) {
+      instance = new TextMarkerTemplateAccess();
+    }
+
+    return instance;
+  }
+
+  /*
+   * @see org.eclipse.dltk.ui.templates.ScriptTemplateAccess#getContextTypeId()
+   */
+  @Override
+  protected String getContextTypeId() {
+    return TextMarkerUniversalTemplateContextType.CONTEXT_TYPE_ID;
+  }
+
+  /*
+   * @see org.eclipse.dltk.ui.templates.ScriptTemplateAccess#getCustomTemplatesKey()
+   */
+  @Override
+  protected String getCustomTemplatesKey() {
+    return CUSTOM_TEMPLATES_KEY;
+  }
+
+  /*
+   * @see org.eclipse.dltk.ui.templates.ScriptTemplateAccess#getPreferenceStore()
+   */
+  @Override
+  protected IPreferenceStore getPreferenceStore() {
+    return TextMarkerUI.getDefault().getPreferenceStore();
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateAccess.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateAccess.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateCompletionProcessor.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateCompletionProcessor.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateCompletionProcessor.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateCompletionProcessor.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,35 @@
+package org.apache.uima.tm.dltk.internal.ui.templates;
+
+import org.eclipse.dltk.ui.templates.ScriptTemplateAccess;
+import org.eclipse.dltk.ui.templates.ScriptTemplateCompletionProcessor;
+import org.eclipse.dltk.ui.text.completion.ScriptContentAssistInvocationContext;
+
+public class TextMarkerTemplateCompletionProcessor extends ScriptTemplateCompletionProcessor {
+
+  private static char[] IGNORE = new char[] { '.' };
+
+  public TextMarkerTemplateCompletionProcessor(ScriptContentAssistInvocationContext context) {
+    super(context);
+  }
+
+  /*
+   * @see org.eclipse.dltk.ui.templates.ScriptTemplateCompletionProcessor#getContextTypeId()
+   */
+  @Override
+  protected String getContextTypeId() {
+    return TextMarkerUniversalTemplateContextType.CONTEXT_TYPE_ID;
+  }
+
+  /*
+   * @see org.eclipse.dltk.ui.templates.ScriptTemplateCompletionProcessor#getTemplateAccess()
+   */
+  @Override
+  protected ScriptTemplateAccess getTemplateAccess() {
+    return TextMarkerTemplateAccess.getInstance();
+  }
+
+  @Override
+  protected char[] getIgnore() {
+    return IGNORE;
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateCompletionProcessor.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateCompletionProcessor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateContext.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateContext.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateContext.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateContext.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,14 @@
+package org.apache.uima.tm.dltk.internal.ui.templates;
+
+import org.eclipse.dltk.core.ISourceModule;
+import org.eclipse.dltk.ui.templates.ScriptTemplateContext;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.templates.TemplateContextType;
+
+public class TextMarkerTemplateContext extends ScriptTemplateContext {
+
+  public TextMarkerTemplateContext(TemplateContextType type, IDocument document,
+          int completionOffset, int completionLength, ISourceModule sourceModule) {
+    super(type, document, completionOffset, completionLength, sourceModule);
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateContext.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerTemplateContext.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerUniversalTemplateContextType.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerUniversalTemplateContextType.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerUniversalTemplateContextType.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerUniversalTemplateContextType.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,28 @@
+package org.apache.uima.tm.dltk.internal.ui.templates;
+
+import org.eclipse.dltk.core.ISourceModule;
+import org.eclipse.dltk.ui.templates.ScriptTemplateContext;
+import org.eclipse.dltk.ui.templates.ScriptTemplateContextType;
+import org.eclipse.jface.text.IDocument;
+
+public class TextMarkerUniversalTemplateContextType extends ScriptTemplateContextType {
+  public static final String CONTEXT_TYPE_ID = "tmUniversalTemplateContextType";
+
+  public TextMarkerUniversalTemplateContextType() {
+    // empty constructor
+  }
+
+  public TextMarkerUniversalTemplateContextType(String id) {
+    super(id);
+  }
+
+  public TextMarkerUniversalTemplateContextType(String id, String name) {
+    super(id, name);
+  }
+
+  @Override
+  public ScriptTemplateContext createContext(IDocument document, int offset, int length,
+          ISourceModule sourceModule) {
+    return new TextMarkerTemplateContext(this, document, offset, length, sourceModule);
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerUniversalTemplateContextType.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/templates/TextMarkerUniversalTemplateContextType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlink.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlink.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlink.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlink.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,59 @@
+package org.apache.uima.tm.dltk.internal.ui.text;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.dltk.internal.ui.editor.DLTKEditorMessages;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+public class ExternalTypeHyperlink implements IHyperlink {
+  private final IRegion region;
+
+  private final IFile file;
+
+  private final String nodeText;
+
+  private final String tsString;
+
+  private final ITextEditor textEditor;
+
+  public ExternalTypeHyperlink(String nodeText, IRegion region, IFile file, String tsString,
+          ITextEditor textEditor) {
+    this.nodeText = nodeText;
+    this.region = region;
+    this.file = file;
+    this.tsString = tsString;
+    this.textEditor = textEditor;
+  }
+
+  @Override
+  public IRegion getHyperlinkRegion() {
+    return region;
+  }
+
+  @Override
+  public String getHyperlinkText() {
+    return nodeText + " in " + tsString;
+  }
+
+  @Override
+  public String getTypeLabel() {
+    return DLTKEditorMessages.ModelElementHyperlink_typeLabel;
+  }
+
+  @Override
+  public void open() {
+    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+    try {
+      page.openEditor(new FileEditorInput(file), "taeconfigurator.editors.MultiPageEditor");
+    } catch (PartInitException e) {
+      e.printStackTrace();
+    }
+
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlink.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlink.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlinkDetector.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlinkDetector.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlinkDetector.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlinkDetector.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,168 @@
+package org.apache.uima.tm.dltk.internal.ui.text;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.uima.UIMAFramework;
+import org.apache.uima.resource.ResourceManager;
+import org.apache.uima.resource.metadata.TypeDescription;
+import org.apache.uima.resource.metadata.TypeSystemDescription;
+import org.apache.uima.tm.dltk.internal.core.builder.TextMarkerProjectUtils;
+import org.apache.uima.tm.dltk.internal.core.codeassist.TextMarkerReferenceVisitor;
+import org.apache.uima.tm.dltk.internal.core.codeassist.TextMarkerSelectionParser;
+import org.apache.uima.tm.dltk.parser.ast.TMTypeConstants;
+import org.apache.uima.tm.dltk.parser.ast.TextMarkerModuleDeclaration;
+import org.apache.uima.tm.dltk.parser.ast.expressions.TextMarkerVariableReference;
+import org.apache.uima.util.InvalidXMLException;
+import org.apache.uima.util.XMLInputSource;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.dltk.ast.ASTNode;
+import org.eclipse.dltk.ast.declarations.ModuleDeclaration;
+import org.eclipse.dltk.compiler.env.ISourceModule;
+import org.eclipse.dltk.core.IModelElement;
+import org.eclipse.dltk.internal.ui.editor.EditorUtility;
+import org.eclipse.dltk.internal.ui.editor.ScriptEditor;
+import org.eclipse.dltk.internal.ui.text.ScriptWordFinder;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+public class ExternalTypeHyperlinkDetector implements IHyperlinkDetector {
+  private ITextEditor fTextEditor;
+
+  public ExternalTypeHyperlinkDetector(ITextEditor editor) {
+    Assert.isNotNull(editor);
+    fTextEditor = editor;
+  }
+
+  @Override
+  public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region,
+          boolean canShowMultipleHyperlinks) {
+    if (region == null || !(fTextEditor instanceof ScriptEditor))
+      return null;
+
+    int offset = region.getOffset();
+
+    IModelElement input = EditorUtility.getEditorInputModelElement(fTextEditor, false);
+    if (input == null)
+      return null;
+
+    try {
+      IDocument document = fTextEditor.getDocumentProvider().getDocument(
+              fTextEditor.getEditorInput());
+      IRegion wordRegion = ScriptWordFinder.findWord(document, offset);
+      if (wordRegion == null)
+        return null;
+      // System.out.println(wordRegion);
+      if (input instanceof ISourceModule) {
+        ISourceModule sm = (ISourceModule) input;
+        IModelElement modelElement = sm.getModelElement();
+        TextMarkerSelectionParser parser = new TextMarkerSelectionParser();
+        ModuleDeclaration moduleDeclaration = parser.parse(sm);
+        String word = document.get(wordRegion.getOffset(), wordRegion.getLength());
+        TextMarkerReferenceVisitor referenceVisitor = new TextMarkerReferenceVisitor(wordRegion
+                .getOffset());
+        moduleDeclaration.traverse(referenceVisitor);
+        ASTNode node = referenceVisitor.getResult();
+        if (node instanceof TextMarkerVariableReference
+                && moduleDeclaration instanceof TextMarkerModuleDeclaration) {
+          TextMarkerVariableReference vr = (TextMarkerVariableReference) node;
+          TextMarkerModuleDeclaration parsed = (TextMarkerModuleDeclaration) moduleDeclaration;
+          if (vr.getType() == TMTypeConstants.TM_TYPE_AT) {
+            String nodeText = vr.getStringRepresentation();
+            Collection<String> importedTypeSystems = parsed.descriptorInfo.getImportedTypeSystems();
+            List<IHyperlink> result = new ArrayList<IHyperlink>();
+            for (String tsString : importedTypeSystems) {
+              IFolder folder = modelElement.getScriptProject().getProject().getFolder(
+                      TextMarkerProjectUtils.getDefaultDescriptorLocation());
+              String xmlFilePath = tsString.replaceAll("\\.", "/");
+              xmlFilePath = xmlFilePath.substring(0, xmlFilePath.length()) + ".xml";
+              Set<String> types = getTypes(folder, xmlFilePath);
+              if (types.contains(nodeText)) {
+                IFile iFile = getFile(folder, xmlFilePath);
+                IHyperlink link = new ExternalTypeHyperlink(nodeText, wordRegion, iFile, tsString,
+                        fTextEditor);
+                result.add(link);
+              }
+            }
+            if (!result.isEmpty()) {
+              return result.toArray(new IHyperlink[] {});
+            } else {
+              return null;
+            }
+          }
+        }
+      }
+    } catch (Exception e) {
+      return null;
+    }
+    return null;
+  }
+
+  private Set<String> getTypes(IFolder folder, String filePath) throws InvalidXMLException,
+          IOException {
+    Set<String> types = new HashSet<String>();
+    IFile iFile = getFile(folder, filePath);
+    URL url;
+    try {
+      url = iFile.getLocationURI().toURL();
+      ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
+      resMgr.setDataPath(folder.getLocation().toPortableString());
+      types = getTypes(url, resMgr);
+    } catch (MalformedURLException e) {
+      e.printStackTrace();
+    }
+    return types;
+  }
+
+  private Set<String> getTypes(URL resource, ResourceManager resMgr) throws IOException,
+          InvalidXMLException {
+    Set<String> types = new HashSet<String>();
+    TypeSystemDescription typeSysDescr = null;
+    typeSysDescr = UIMAFramework.getXMLParser().parseTypeSystemDescription(
+            new XMLInputSource(resource));
+    typeSysDescr.resolveImports(resMgr);
+    for (TypeDescription each : typeSysDescr.getTypes()) {
+      String name = each.getName();
+      String[] nameSpace = name.split("[.]");
+      types.add(nameSpace[nameSpace.length - 1]);
+      StringBuffer fullName = new StringBuffer();
+      if (nameSpace.length > 0) {
+        fullName.append(nameSpace[0]);
+      }
+      for (int i = 1; i < nameSpace.length; i++) {
+        // TODO fix workaround
+        if (!nameSpace[i].equals("type")) {
+          fullName.append('.');
+          fullName.append(nameSpace[i]);
+        }
+      }
+      types.add(fullName.toString());
+    }
+    return types;
+  }
+
+  private IFile getFile(IFolder folder, String filePath) {
+    int lastDot = filePath.lastIndexOf('.');
+    int sndLastDot = filePath.lastIndexOf('.', lastDot - 1);
+    String fName = filePath;
+    if (sndLastDot >= 0) {
+      String subFolder = filePath.substring(0, sndLastDot);
+      folder = folder.getFolder(subFolder);
+      fName = filePath.substring(sndLastDot + 1);
+    }
+    return folder.getFile(fName);
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlinkDetector.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/ExternalTypeHyperlinkDetector.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/Messages.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/Messages.java?rev=1152804&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/Messages.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/Messages.java Mon Aug  1 14:37:34 2011
@@ -0,0 +1,16 @@
+package org.apache.uima.tm.dltk.internal.ui.text;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+  private static final String BUNDLE_NAME = "org.apache.uima.tm.dltk.internal.ui.text.messages"; //$NON-NLS-1$
+
+  public static String TextMarkerRequirePackageMarkerResolution_addPackageToBuildpath;
+  static {
+    // initialize resource bundle
+    NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+  }
+
+  private Messages() {
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/Messages.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.dltk.ui/src/main/java/org/apache/uima/tm/dltk/internal/ui/text/Messages.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain