Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
32 | 2 | 1 | 0.970 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 34 | 290 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java |
2 | 32 | 544 | plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java |
| ||||
private void setEditorListeners(Text text) { // CR means commit the changes, ESC means abort and don't commit text.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent event) { if (event.character == SWT.CR) { if (fInvalidEditorText != null) { fEditorText.setText(fInvalidEditorText); fInvalidEditorText = null; } else { validateChangeAndCleanup(); } } else if (event.character == SWT.ESC) { removeNewFilter(); cleanupEditor(); } } } ); // Consider loss of focus on the editor to mean the same as CR text.addFocusListener(new FocusAdapter() { public void focusLost(FocusEvent event) { if (fInvalidEditorText != null) { fEditorText.setText(fInvalidEditorText); fInvalidEditorText = null; } else { validateChangeAndCleanup(); } } } ); // Consume traversal events from the text widget so that CR doesn't // traverse away to dialog's default button. Without this, hitting // CR in the text field closes the entire dialog. text.addListener(SWT.Traverse, new Listener() { public void handleEvent(Event event) { event.doit = false; } } ); } |
| ||||
private void setEditorListeners(Text text) { // CR means commit the changes, ESC means abort and don't commit text.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent event) { if (event.character == SWT.CR) { if (fInvalidEditorText != null) { fEditorText.setText(fInvalidEditorText); fInvalidEditorText = null; } else validateChangeAndCleanup(); } else if (event.character == SWT.ESC) { removeNewFilter(); cleanupEditor(); } } } ); // Consider loss of focus on the editor to mean the same as CR text.addFocusListener(new FocusAdapter() { public void focusLost(FocusEvent event) { if (fInvalidEditorText != null) { fEditorText.setText(fInvalidEditorText); fInvalidEditorText = null; } else validateChangeAndCleanup(); } } ); // Consume traversal events from the text widget so that CR doesn't // traverse away to dialog's default button. Without this, hitting // CR in the text field closes the entire dialog. text.addListener(SWT.Traverse, new Listener() { public void handleEvent(Event event) { event.doit = false; } } ); } |
| |||
private void setEditorListeners(Text text) { // CR means commit the changes, ESC means abort and don't commit text.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent event) { if (event.character == SWT.CR) { if (fInvalidEditorText != null) { fEditorText.setText(fInvalidEditorText); fInvalidEditorText = null; } else [[#variableba50c180]] } else if (event.character == SWT.ESC) { removeNewFilter(); cleanupEditor(); } } } ); // Consider loss of focus on the editor to mean the same as CR text.addFocusListener(new FocusAdapter() { public void focusLost(FocusEvent event) { if (fInvalidEditorText != null) { fEditorText.setText(fInvalidEditorText); fInvalidEditorText = null; } else [[#variableba50c180]] } } ); // Consume traversal events from the text widget so that CR doesn't // traverse away to dialog's default button. Without this, hitting // CR in the text field closes the entire dialog. text.addListener(SWT.Traverse, new Listener() { public void handleEvent(Event event) { event.doit = false; } } ); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#ba50c180]] | validateChangeAndCleanup(); |
1 | 2 | [[#ba50c180]] | { validateChangeAndCleanup(); } |