Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
28 | 2 | 6 | 0.964 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 28 | 52 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/OpenCloseWorkingSetAction.java |
2 | 28 | 83 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/OpenCloseWorkingSetAction.java |
| ||||
private static final class CloseWorkingSetAction extends OpenCloseWorkingSetAction { private IAction fProjectAction; private CloseWorkingSetAction(IWorkbenchSite site, String label) { super(site, label); IActionBars actionBars = getActionBars(); if (actionBars != null) { fProjectAction = actionBars.getGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId()); } } protected boolean validate(IProject project) { return project.isOpen(); } protected void performOperation(IProject project, IProgressMonitor monitor) throws CoreException { project.close(monitor); } protected void connectToActionBar(IActionBars actionBars) { actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), this ); actionBars.updateActionBars(); } protected void disconnectFromActionBar(IActionBars actionBars) { actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), fProjectAction); actionBars.updateActionBars(); } protected String getErrorTitle() { return WorkingSetMessages.OpenCloseWorkingSetAction_close_error_title; } protected String getErrorMessage() { return WorkingSetMessages.OpenCloseWorkingSetAction_close_error_message; } } |
| ||||
private static final class OpenWorkingSetAction extends OpenCloseWorkingSetAction { private IAction fProjectAction; private OpenWorkingSetAction(IWorkbenchSite site, String label) { super(site, label); IActionBars actionBars = getActionBars(); if (actionBars != null) { fProjectAction = actionBars.getGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId()); } } protected boolean validate(IProject project) { return !project.isOpen(); } protected void performOperation(IProject project, IProgressMonitor monitor) throws CoreException { project.open(monitor); } protected void connectToActionBar(IActionBars actionBars) { actionBars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), this ); actionBars.updateActionBars(); } protected void disconnectFromActionBar(IActionBars actionBars) { actionBars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), fProjectAction); actionBars.updateActionBars(); } protected String getErrorTitle() { return WorkingSetMessages.OpenCloseWorkingSetAction_open_error_title; } protected String getErrorMessage() { return WorkingSetMessages.OpenCloseWorkingSetAction_open_error_message; } } |
| |||
private static final class [[#variable587bd1a0]]extends OpenCloseWorkingSetAction { private IAction fProjectAction; private [[#variable587bd1a0]](IWorkbenchSite site, String label) { super(site, label); IActionBars actionBars = getActionBars(); if (actionBars != null) { fProjectAction = actionBars.getGlobalActionHandler(IDEActionFactory. [[#variable587bd100]].getId()); } } protected boolean validate(IProject project) { return [[#variable587bd060]]; } protected void performOperation(IProject project, IProgressMonitor monitor) throws CoreException { project. [[#variable587bcfe0]](monitor); } protected void connectToActionBar(IActionBars actionBars) { actionBars.setGlobalActionHandler(IDEActionFactory. [[#variable587bd100]].getId(), this ); actionBars.updateActionBars(); } protected void disconnectFromActionBar(IActionBars actionBars) { actionBars.setGlobalActionHandler(IDEActionFactory. [[#variable587bd100]].getId(), fProjectAction); actionBars.updateActionBars(); } protected String getErrorTitle() { return WorkingSetMessages. [[#variable587bcf40]]; } protected String getErrorMessage() { return WorkingSetMessages. [[#variable587bce80]]; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#587bd1a0]] | CloseWorkingSetAction |
1 | 2 | [[#587bd1a0]] | OpenWorkingSetAction |
2 | 1 | [[#587bd100]] | CLOSE_PROJECT |
2 | 2 | [[#587bd100]] | OPEN_PROJECT |
3 | 1 | [[#587bd060]] | project.isOpen() |
3 | 2 | [[#587bd060]] | !project.isOpen() |
4 | 1 | [[#587bcfe0]] | close |
4 | 2 | [[#587bcfe0]] | open |
5 | 1 | [[#587bcf40]] | OpenCloseWorkingSetAction_close_error_title |
5 | 2 | [[#587bcf40]] | OpenCloseWorkingSetAction_open_error_title |
6 | 1 | [[#587bce80]] | OpenCloseWorkingSetAction_close_error_message |
6 | 2 | [[#587bce80]] | OpenCloseWorkingSetAction_open_error_message |