Skip to content

Commit

Permalink
added option to change String and comment coloring in the editor; Dec…
Browse files Browse the repository at this point in the history
…reased default parse delay to 1s; Drafted new release 0.7.7
  • Loading branch information
Krzmbrzl committed Jun 7, 2018
1 parent 204de92 commit 40df184
Show file tree
Hide file tree
Showing 18 changed files with 272 additions and 286 deletions.
2 changes: 1 addition & 1 deletion plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Editors
Bundle-SymbolicName: raven.sqdev.editors;singleton:=true
Bundle-Version: 0.7.2.stable
Bundle-Version: 0.7.3.stable
Bundle-Activator: raven.sqdev.editors.activator.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;

import raven.sqdev.constants.ISQDevColorConstants;
import raven.sqdev.constants.SQDevPreferenceConstants;
import raven.sqdev.infoCollection.base.Keyword;
import raven.sqdev.misc.SQDevPreferenceUtil;
Expand Down Expand Up @@ -248,15 +247,15 @@ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceVie
if (containsString) {
// colorize strings
NonRuleBasedDamagerRepairer ndr_String = new NonRuleBasedDamagerRepairer(
new TextAttribute(colorManager.getColor(ISQDevColorConstants.STRING)));
new TextAttribute(SQDevPreferenceUtil.getStringHighlightingColor()));
reconciler.setDamager(ndr_String, BasicPartitionScanner.BASIC_STRING);
reconciler.setRepairer(ndr_String, BasicPartitionScanner.BASIC_STRING);
}

if (containsComment) {
// colorize comments
NonRuleBasedDamagerRepairer ndr_Comment = new NonRuleBasedDamagerRepairer(
new TextAttribute(colorManager.getColor(ISQDevColorConstants.COMMENT)));
new TextAttribute(SQDevPreferenceUtil.getCommentHighlightingColor()));
reconciler.setDamager(ndr_Comment, BasicPartitionScanner.BASIC_COMMENT);
reconciler.setRepairer(ndr_Comment, BasicPartitionScanner.BASIC_COMMENT);
}
Expand Down Expand Up @@ -301,6 +300,11 @@ public void propertyChange(PropertyChangeEvent event) {
case SQDevPreferenceConstants.SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY:
assistant.enableAutoActivation((boolean) event.getNewValue());
break;

case SQDevPreferenceConstants.SQDEV_EDITOR_STRINGHIGHLIGHTING_COLOR_KEY:
case SQDevPreferenceConstants.SQDEV_EDITOR_COMMENTHIGHLIGHTING_COLOR_KEY:
editor.update(false);
break;

default:
if (configuredKeywordScanners.containsKey(event.getProperty())) {
Expand Down
2 changes: 1 addition & 1 deletion plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Misc
Bundle-SymbolicName: raven.sqdev.misc;singleton:=true
Bundle-Version: 0.7.0.stable2
Bundle-Version: 0.7.1.stable
Bundle-Activator: raven.sqdev.activator.Activator
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.swt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,130 +6,139 @@
* @author Raven
*/
public class SQDevPreferenceConstants {

/**
* The name of the preference holding the location to the ArmA folder on the
* local disk
*/
public static final String SQDEV_INFO_ARMA_MAIN_DIRECTORY = "raven.sqdev.ArmAProgramDirectory";

/**
* The name of the preference holding the location of the ArmA folder in the
* documents directory on the local disk
*/
public static final String SQDEV_INFO_ARMA_DOCUMENTS_DIRECTORY = "raven.sqdev.ArmADocumentsDirectory";

/**
* The name of the preference holding the default profile of the user
*/
public static final String SQDEV_INFO_DEFAULT_PROFILE = "raven.sqdev.defaultProfile";

/**
* The name of the preference holding the default terrain
*/
public static final String SQDEV_INFO_DEFAULT_TERRAIN = "raven.sqdev.defaultTerrain";

/**
* The name of the preference indicating if autoExport is enabled by default
*/
public static final String SQDEV_INFO_DEFAULT_AUTOEXPORT = "raven.sqdev.defaultAutoExport";

/**
* The name of the preference indicating whether the preference page should
* ask to save unsaved preferences when clicking OK
* The name of the preference indicating whether the preference page should ask
* to save unsaved preferences when clicking OK
*/
public static final String SQDEV_PROMPT_ALWAYS_SAVE_ON_EXIT = "raven.sqdev.AlwaysSaveOnExit";

/**
* The name of the preference indicating whether the user should be asked
* again if he selected an action that will delete a file
* The name of the preference indicating whether the user should be asked again
* if he selected an action that will delete a file
*/
public static final String SQDEV_PROMPT_ASK_FOR_DELETION = "raven.sqdev.askForDeletion";

/**
* The name of the preference indicating whether matching brackets should
* get highlighted
* The name of the preference indicating whether matching brackets should get
* highlighted
*/
public static final String SQDEV_EDITOR_MATCHING_BRACKETS_KEY = "raven.sqdev.enableBracketMatch";

/**
* The name of the preference indicating the color of the highlight of a
* matching bracket
*/
public static final String SQDEV_EDITOR_MATCHING_BRACKETS_COLOR_KEY = "raven.sqdev.matchingBracketsColor";

/**
* The name of the preference indicating whether autoCompletion should be
* enabled
*/
public static final String SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY = "raven.sqdev.enableAutoComplete";

/**
* The name of the preference indicating whether the current line should get
* highlighted
*/
public static final String SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_KEY = "raven.sqdev.highlightCurrentLine";

/**
* The preferences indicating the color of the current line highlighting
*/
public static final String SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_COLOR_KEY = "raven.sqdev.currentLineHighlightingColor";

/**
* The preferences indicating the color of the keyword highlighting
*/
public static final String SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY = "raven.sqdev.keywordHighlightingColor";

/**
* The preference indicating the color of the local variable highlighting
*/
public static final String SQDEV_EDITOR_LOCALVARIABLEHIGHLIGHTING_COLOR_KEY = "raven.sqdev.localVariableHighlightingColor";

/**
* The preference indicating the color of the global variable highlighting
*/
public static final String SQDEV_EDITOR_GLOBALVARIABLEHIGHLIGHTING_COLOR_KEY = "raven.sqdev.globalVariableHighlightingColor";

/**
* The preference indicating the color of the magic variable highlighting
*/
public static final String SQDEV_EDITOR_MAGICVARIABLEHIGHLIGHTING_COLOR_KEY = "raven.sqdev.magicVariableHighlightingColor";

/**
* The preference indicating the color of the macro highlighting
*/
public static final String SQDEV_EDITOR_MACROHIGHLIGHTING_COLOR_KEY = "raven.sqdev.macroHighlightingColor";


/**
* The preference indicating the color of the string highlighting
*/
public static final String SQDEV_EDITOR_STRINGHIGHLIGHTING_COLOR_KEY = "raven.sqdev.stringHighlightingColor";

/**
* The preference indicating the delay before parsing after the user typed
* in something
* The preference indicating the color of the string highlighting
*/
public static final String SQDEV_EDITOR_COMMENTHIGHLIGHTING_COLOR_KEY = "raven.sqdev.commentHighlightingColor";

/**
* The preference indicating the delay before parsing after the user typed in
* something
*/
public static final String SQDEV_EDITOR_PARSE_DELAY = "raven.sqdev.parsingInterval";

/**
* The preference indicating if a directory should be cleaned without asking
* for permission when exporting a project
* The preference indicating if a directory should be cleaned without asking for
* permission when exporting a project
*/
public static final String SQDEV_EXPORT_AUTOCLEAN = "raven.sqdev.autoClean";

/**
* The preference holding the web adress to the BIKI API
*/
public static final String SQDEV_COLLECTION_API_ADRESS = "raven.sqdev.collection.apiAdress";

/**
* The preference holding the wname of the main page that lists all the SQF
* commands
*/
public static final String SQDEV_COLLECTION_API_MAINPAGE = "raven.sqdev.collection.apiMainPage";

/**
* The preference holding the path to the folder where ArmA stores it's RPTs
*/
public static final String SQDEV_VIEWS_RPTVIEWER_RPT_PATH = "raven.sqdev.rptViewer.rptPath";
/**
* The preference indicating whether the RPTViewer should format it's
* content
* The preference indicating whether the RPTViewer should format it's content
*/
public static final String SQDEV_VIEWS_RPTVIEWER_FORMAT = "raven.sqdev.views.rptViewer.autoFormatRPTContent";
/**
Expand All @@ -138,8 +147,8 @@ public class SQDevPreferenceConstants {
*/
public static final String SQDEV_VIEWS_RPTVIEWER_FORMAT_PREFIXES = "raven.sqdev.views.rptViewer.formatPrefixes";
/**
* The preferences storing the maximum amount of blank lines that may occur
* in a formatted RPT in a row
* The preferences storing the maximum amount of blank lines that may occur in a
* formatted RPT in a row
*/
public static final String SQDEV_VIEWS_RPTVIEWER_MAX_BLANK_REPETITION = "raven.sqdev.views.rptViewer.maxBlankRepetition";
}
Loading

0 comments on commit 40df184

Please sign in to comment.