| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 64 | 2 | 4 | 0.979 | type_declarations |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 64 | 23 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistAdvancedPreferencePage.java |
| 2 | 64 | 34 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistPreferencePage.java |
| ||||
public final class CodeAssistAdvancedPreferencePage extends PropertyAndPreferencePage {
private CodeAssistAdvancedConfigurationBlock fConfigurationBlock;
public void createControl(Composite parent) {
IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
fConfigurationBlock = new CodeAssistAdvancedConfigurationBlock(getNewStatusChangedListener(), container);
super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
}
protected Control createPreferenceContent(Composite composite) {
return fConfigurationBlock.createContents(composite);
}
protected boolean hasProjectSpecificOptions(IProject project) {
return false;
}
protected String getPreferencePageID() {
return "org.eclipse.jdt.ui.preferences.CodeAssistPreferenceAdvanced"; //$NON-NLS-1$
}
protected String getPropertyPageID() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.DialogPage#dispose()
*/
public void dispose() {
if (fConfigurationBlock != null) {
fConfigurationBlock.dispose();
}
super.dispose();
}
/*
* @see org.eclipse.jface.preference.IPreferencePage#performDefaults()
*/
protected void performDefaults() {
super.performDefaults();
if (fConfigurationBlock != null) {
fConfigurationBlock.performDefaults();
}
}
/*
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
public boolean performOk() {
if (fConfigurationBlock != null && !fConfigurationBlock.performOk()) {
return false;
}
return super.performOk();
}
/*
* @see org.eclipse.jface.preference.IPreferencePage#performApply()
*/
public void performApply() {
if (fConfigurationBlock != null) {
fConfigurationBlock.performApply();
}
}
}
|
| ||||
/**
* Content Assist preference page.
* <p>
* Note: Must be public since it is referenced from plugin.xml
* </p>
*
* @since 3.0
*/
public class CodeAssistPreferencePage extends PropertyAndPreferencePage implements IWorkbenchPreferencePage {
private CodeAssistConfigurationBlock fConfigurationBlock;
public void createControl(Composite parent) {
IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
fConfigurationBlock = new CodeAssistConfigurationBlock(getNewStatusChangedListener(), container);
super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
}
protected Control createPreferenceContent(Composite composite) {
return fConfigurationBlock.createContents(composite);
}
protected boolean hasProjectSpecificOptions(IProject project) {
return false;
}
protected String getPreferencePageID() {
return "org.eclipse.jdt.ui.preferences.CodeAssistPreferencePage"; //$NON-NLS-1$
}
protected String getPropertyPageID() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.DialogPage#dispose()
*/
public void dispose() {
if (fConfigurationBlock != null) {
fConfigurationBlock.dispose();
}
super.dispose();
}
/*
* @see org.eclipse.jface.preference.IPreferencePage#performDefaults()
*/
protected void performDefaults() {
super.performDefaults();
if (fConfigurationBlock != null) {
fConfigurationBlock.performDefaults();
}
}
/*
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
public boolean performOk() {
if (fConfigurationBlock != null && !fConfigurationBlock.performOk()) {
return false;
}
return super.performOk();
}
/*
* @see org.eclipse.jface.preference.IPreferencePage#performApply()
*/
public void performApply() {
if (fConfigurationBlock != null) {
fConfigurationBlock.performApply();
}
}
}
|
| |||
[[#variable9b1c2420]] [[#variable9b1c23e0]]{
private [[#variableb5e2d4a0]] fConfigurationBlock;
public void createControl(Composite parent) {
IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
fConfigurationBlock = new [[#variableb5e2d4a0]](getNewStatusChangedListener(), container);
super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
}
protected Control createPreferenceContent(Composite composite) {
return fConfigurationBlock.createContents(composite);
}
protected boolean hasProjectSpecificOptions(IProject project) {
return false;
}
protected String getPreferencePageID() {
return [[#variable9b1c24a0]]; //$NON-NLS-1$
}
protected String getPropertyPageID() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.DialogPage#dispose()
*/
public void dispose() {
if (fConfigurationBlock != null) {
fConfigurationBlock.dispose();
}
super.dispose();
}
/*
* @see org.eclipse.jface.preference.IPreferencePage#performDefaults()
*/
protected void performDefaults() {
super.performDefaults();
if (fConfigurationBlock != null) {
fConfigurationBlock.performDefaults();
}
}
/*
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
public boolean performOk() {
if (fConfigurationBlock != null && !fConfigurationBlock.performOk()) {
return false;
}
return super.performOk();
}
/*
* @see org.eclipse.jface.preference.IPreferencePage#performApply()
*/
public void performApply() {
if (fConfigurationBlock != null) {
fConfigurationBlock.performApply();
}
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#9b1c2420]] | /** * Content Assist preference page. * <p> * Note: Must be public since it is referenced from plugin.xml * </p> * * @since 3.0 */ public |
| 1 | 2 | [[#9b1c2420]] | public final |
| 2 | 1 | [[#9b1c23e0]] | class CodeAssistPreferencePage extends PropertyAndPreferencePage implements IWorkbenchPreferencePage |
| 2 | 2 | [[#9b1c23e0]] | class CodeAssistAdvancedPreferencePage extends PropertyAndPreferencePage |
| 3 | 1 | [[#b5e2d4a0]] | CodeAssistConfigurationBlock |
| 3 | 2 | [[#b5e2d4a0]] | CodeAssistAdvancedConfigurationBlock |
| 4 | 1 | [[#9b1c24a0]] | "org.eclipse.jdt.ui.preferences.CodeAssistPreferencePage" |
| 4 | 2 | [[#9b1c24a0]] | "org.eclipse.jdt.ui.preferences.CodeAssistPreferenceAdvanced" |