ASM #17039 - Remove HighlightFramingCodes feature
Change-Id: I7ee07ef64b1a16cdeb0b6af48ccaf3c228357891 Former-commit-id:0a489fea9c
[formerly5470139b42
] [formerly0a489fea9c
[formerly5470139b42
] [formerly1188dab0f4
[formerly cb047745b4a5c523bd1ca26692c758d3e72d8ddc]]] Former-commit-id:1188dab0f4
Former-commit-id:e1762b3ae9
[formerlyf41d5cffef
] Former-commit-id:ff0177a6dd
This commit is contained in:
parent
5018506b64
commit
520899992d
3 changed files with 4 additions and 93 deletions
|
@ -32,6 +32,7 @@
|
|||
# 11/20/2013 2488 randerso Changed to use DejaVu fonts
|
||||
# 05/28/2014 2841 randerso Added separate configurable limits for
|
||||
# text formatter and product script tasks
|
||||
# 02/04/2015 17039 ryu Removed HighlightFramingCodes setting.
|
||||
|
||||
GFESUITE_HOME = "/awips2/GFESuite"
|
||||
GFESUITE_PRDDIR = "/tmp/products"
|
||||
|
@ -759,10 +760,6 @@ QPF_SetValue_zoom = 10
|
|||
# Edited Data" on the dialog. The default if not specified is "By Gaps".
|
||||
#InterpolateDialogMode = "Gaps"
|
||||
|
||||
# In Formatter Launcher, whether to highlight framing codes and the
|
||||
# text enclosed by them in the text editor component.
|
||||
HighlightFramingCodes = no
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Weather Element Configuration
|
||||
|
|
|
@ -163,6 +163,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* 12/01/2014 #624 zhao Modified saveFile()
|
||||
* 12/16/2014 #14946 ryu Modified updateIssueExpireTimes() so issuance time is displayed
|
||||
* for the local time zones for each segment.
|
||||
* 02/04/2014 17039 ryu Removed menu item related to the HighlighFramingCodes feature.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -281,8 +282,6 @@ public class ProductEditorComp extends Composite implements
|
|||
|
||||
private MenuItem autoWrapMI;
|
||||
|
||||
private MenuItem framingCodeMI;
|
||||
|
||||
/**
|
||||
* Date & time formatter.
|
||||
*/
|
||||
|
@ -876,20 +875,6 @@ public class ProductEditorComp extends Composite implements
|
|||
}
|
||||
});
|
||||
|
||||
framingCodeMI = new MenuItem(menuToAddTo, SWT.CHECK);
|
||||
framingCodeMI.setText("Highlight Framing Codes");
|
||||
framingCodeMI.setSelection(Activator.getDefault().getPreferenceStore()
|
||||
.getBoolean("HighlightFramingCodes"));
|
||||
framingCodeMI.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
textComp.setFramingCodeState(framingCodeMI.getSelection());
|
||||
textComp.reParse();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
MenuItem wrapLengthMI = new MenuItem(menuToAddTo, SWT.PUSH);
|
||||
wrapLengthMI.setText("Wrap Length...");
|
||||
wrapLengthMI.addSelectionListener(new SelectionAdapter() {
|
||||
|
|
|
@ -41,7 +41,6 @@ import org.eclipse.swt.custom.StyleRange;
|
|||
import org.eclipse.swt.custom.StyledText;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.events.KeyAdapter;
|
||||
import org.eclipse.swt.events.KeyEvent;
|
||||
import org.eclipse.swt.events.VerifyEvent;
|
||||
import org.eclipse.swt.events.VerifyListener;
|
||||
|
@ -84,6 +83,8 @@ import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil;
|
|||
* 29 AUG 2013 #2250 dgilling Better error handling for parseProductText().
|
||||
* 04 SEP 2013 16534 ryu Fixed word wrap to not insert duplicate text; refactor.
|
||||
* 20 DEC 2013 16854 ryu Force re-parsing of text on type change.
|
||||
* 04 FEB 2015 17039 ryu Removed HighlightFramingCodes feature which prevented
|
||||
* editing of framing codes.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -148,9 +149,6 @@ public class StyledTextComp extends Composite {
|
|||
*/
|
||||
private Listener mouseListener;
|
||||
|
||||
private boolean highlight = Activator.getDefault().getPreferenceStore()
|
||||
.getBoolean("HighlightFramingCodes");
|
||||
|
||||
private boolean newProduct = false;
|
||||
|
||||
private Set<String> unlockCitySegs;
|
||||
|
@ -276,13 +274,6 @@ public class StyledTextComp extends Composite {
|
|||
textEditorST.setBackground(bgColor);
|
||||
textEditorST.setForeground(fgColor);
|
||||
|
||||
textEditorST.addKeyListener(new KeyAdapter() {
|
||||
@Override
|
||||
public void keyReleased(KeyEvent ke) {
|
||||
handleKeyRelease(ke);
|
||||
}
|
||||
});
|
||||
|
||||
textEditorST.addVerifyListener(new VerifyListener() {
|
||||
@Override
|
||||
public void verifyText(VerifyEvent e) {
|
||||
|
@ -789,27 +780,6 @@ public class StyledTextComp extends Composite {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the key event when a key is released.
|
||||
*
|
||||
* @param ke
|
||||
* Key event.
|
||||
*/
|
||||
private void handleKeyRelease(KeyEvent ke) {
|
||||
int offset = textEditorST.getCaretOffset();
|
||||
|
||||
StyleRange[] srArray = textEditorST.getStyleRanges(true);
|
||||
|
||||
for (int i = 0; i < srArray.length; i++) {
|
||||
if (srArray[i].start <= offset
|
||||
&& offset <= srArray[i].start + srArray[i].length) {
|
||||
if (srArray[i].foreground == frameColor) {
|
||||
inFramingCode(srArray[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there is selected text and if there is locked text in the
|
||||
* selected text.
|
||||
|
@ -848,18 +818,6 @@ public class StyledTextComp extends Composite {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Select the framing code and the text contained in the framing code.
|
||||
*
|
||||
* @param sr
|
||||
* StyleRange.
|
||||
*/
|
||||
private void inFramingCode(StyleRange sr) {
|
||||
if (highlight) {
|
||||
textEditorST.setSelection(sr.start, sr.start + sr.length);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the key being pressed is a "non-edit" key.
|
||||
*
|
||||
|
@ -888,8 +846,6 @@ public class StyledTextComp extends Composite {
|
|||
public void handleEvent(Event e) {
|
||||
if (e.type == SWT.MouseDown) {
|
||||
handleMouseDown(e);
|
||||
} else if (e.type == SWT.MouseUp) {
|
||||
handleMouseUp(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -930,33 +886,6 @@ public class StyledTextComp extends Composite {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the mouse up event
|
||||
*
|
||||
* @param e
|
||||
* Event fired.
|
||||
*/
|
||||
private void handleMouseUp(Event e) {
|
||||
if (e.button == 1) {
|
||||
int offset = textEditorST.getCaretOffset();
|
||||
|
||||
StyleRange[] sr = textEditorST.getStyleRanges(true);
|
||||
|
||||
for (int i = 0; i < sr.length; i++) {
|
||||
if (sr[i].start <= offset
|
||||
&& offset <= sr[i].start + sr[i].length) {
|
||||
if (sr[i].foreground == frameColor) {
|
||||
inFramingCode(sr[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setFramingCodeState(boolean highlight) {
|
||||
this.highlight = highlight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cut the selected text if the selection does not contain locked text.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue