Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
35 | 2 | 0 | 1.000 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 35 | 44 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddClassFileMarkerAction.java |
2 | 34 | 43 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerRulerAction.java |
| ||||
/** * @see AddMarkerAction#getResource() */ protected IResource getResource() { IResource resource = null; IEditorInput input = getTextEditor().getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFile c = ((IClassFileEditorInput) input).getClassFile(); IResourceLocator locator = (IResourceLocator) c.getAdapter(IResourceLocator.class ); if (locator != null) { try { resource = locator.getContainingResource(c); } catch (JavaModelException x) { // ignore but should inform } } } return resource; } /** * @see AddMarkerAction#getInitialAttributes() */ protected Map getInitialAttributes() { Map attributes = super.getInitialAttributes(); IEditorInput input = getTextEditor().getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFile classFile = ((IClassFileEditorInput) input).getClassFile(); JavaCore.addJavaElementMarkerAttributes(attributes, classFile); } return attributes; } |
| ||||
/** * @see MarkerRulerAction#getResource() */ protected IResource getResource() { IResource resource = null; IEditorInput input = getTextEditor().getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFile c = ((IClassFileEditorInput) input).getClassFile(); IResourceLocator locator = (IResourceLocator) c.getAdapter(IResourceLocator.class ); if (locator != null) { try { resource = locator.getContainingResource(c); } catch (JavaModelException x) { // ignore but should inform } } } return resource; } /** * @see MarkerRulerAction#getInitialAttributes() */ protected Map getInitialAttributes() { Map attributes = super.getInitialAttributes(); IEditorInput input = getTextEditor().getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFile classFile = ((IClassFileEditorInput) input).getClassFile(); JavaCore.addJavaElementMarkerAttributes(attributes, classFile); } return attributes; } |
| |||
/** * @see AddMarkerAction#getResource() */ /** * @see MarkerRulerAction#getResource() */ protected IResource getResource() { IResource resource = null; IEditorInput input = getTextEditor().getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFile c = ((IClassFileEditorInput) input).getClassFile(); IResourceLocator locator = (IResourceLocator) c.getAdapter(IResourceLocator.class ); if (locator != null) { try { resource = locator.getContainingResource(c); } catch (JavaModelException x) { // ignore but should inform } } } return resource; } /** * @see AddMarkerAction#getInitialAttributes() */ /** * @see MarkerRulerAction#getInitialAttributes() */ protected Map getInitialAttributes() { Map attributes = super.getInitialAttributes(); IEditorInput input = getTextEditor().getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFile classFile = ((IClassFileEditorInput) input).getClassFile(); JavaCore.addJavaElementMarkerAttributes(attributes, classFile); } return attributes; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |