Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Recommenders/Attic/ExtDoc"

(Removing all content from page)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Selection Context ==
 
  
{| border="1" cellpadding="6" cellspacing="0"
 
! style="background: #ffdead;" | Selection
 
! style="background: #ffdead;" | JavaElement
 
! style="background: #ffdead;" | AstNode / Parent
 
! style="background: #ffdead;" | Location
 
|-
 
! style="background: #efefef;" colspan="4" | CompilationUnitEditor
 
|-
 
| package tes↓t;
 
| PackageFragment
 
| SimpleName / QualifiedName
 
| PACKAGE_DECLARATION
 
|-
 
| import org.eclipse.swt.widgets.But↓ton;
 
| ResolvedBinaryType
 
| SimpleName / QualifiedName
 
| IMPORT_DECLARATION
 
|-
 
| import org.eclipse.swt.widg↓ets.Button;
 
| JarPackageFragment
 
| SimpleName / QualifiedName
 
| IMPORT_DECLARATION
 
|-
 
| public class Tes↓t extends Button implements ISelectionListener
 
| SourceType
 
| SimpleName / TypeDeclaration
 
| TYPE_DECLARATION
 
|-
 
| public class Test extends Butto↓n implements ISelectionListener
 
| ResolvedBinaryType
 
| SimpleName / SimpleType
 
| TYPE_DECLARATION_EXTENDS
 
|-
 
| public class Test extends Button implements ISelectionListen↓er
 
| ResolvedBinaryType
 
| SimpleName / SimpleType
 
| TYPE_DECLARATION_IMPLEMENTS
 
|-
 
| private Button butto↓n;
 
| ResolvedBinaryType
 
| SimpleName / VariableDeclarationFragment
 
| FIELD_DECLARATION
 
|-
 
| private Butto↓n button;
 
| ResolvedBinaryType
 
| SimpleName / SimpleType
 
| FIELD_DECLARATION
 
|-
 
| public Button test(Composite arg0, int arg↓1)
 
| LocalVariable
 
| SingleName / SingleVariableDeclaration
 
| METHOD_DECLARATION_PARAMETER
 
|-
 
| public Button test(Composit↓e arg0, int arg1)
 
| ResolvedBinaryType
 
| SimpleName / SimpleType
 
| METHOD_DECLARATION_PARAMETER
 
|-
 
| public Button tes↓t(Composite arg0, int arg1)
 
| SourceMethod
 
| SimpleName / MethodDeclaration
 
| METHOD_DECLARATION
 
|-
 
| public Butto↓n test(Composite arg0, int arg1)
 
| ResolvedBinaryType
 
| SimpleName / SimpleType
 
| METHOD_DECLARATION
 
|-
 
| Button butto↓n = new Button(null, 0);
 
| LocalVariable
 
| SimpleName / VariableDeclarationFragment
 
| BLOCK
 
|-
 
| button.setEnabl↓e()
 
| ResolvedBinaryMethod
 
| SimpleName / MethodInvocation
 
| BLOCK
 
|-
 
| butto↓n.setEnable()
 
| LocalVariable
 
| SimpleName / MethodInvocation
 
| BLOCK
 
|-
 
| this.butto↓n.setEnable()
 
| ResolvedSourceField
 
| SimpleName / FieldAccess
 
| BLOCK
 
|-
 
| return butto↓n;
 
| LocalVariable
 
| SimpleName / ReturnStatement
 
| BLOCK
 
|-
 
! style="background: #efefef;" colspan="4" | Package Explorer / JavaElement
 
|-
 
| colspan="4" | JavaProject, PackageFragmentRoot, PackageFragment, CompilationUnit, SourceType, SourceField, SourceMethod
 
|-
 
! style="background: #efefef;" colspan="4" | Outline / JavaElement
 
|-
 
| colspan="4" | PackageDeclaration, ImportContainer, ImportDeclaration, SourceType, SourceField, SourceMethod
 
|}
 
 
 
== IJavaElementSelection ==
 
 
<source lang="java">
 
/**
 
* Contains all required information about the user's selection of a java
 
* element in the perspective (e.g. Editor, Package Explorer, Outline, ...).
 
*/
 
public interface IJavaElementSelection {
 
 
    /**
 
    * @return The selected java element.
 
    */
 
    IJavaElement getJavaElement();
 
 
    /**
 
    * @return The location type inside the compilation unit (e.g.
 
    *        "method declaration" or "block") if the selection occurs in the
 
    *        editor.
 
    */
 
    ElementLocation getElementLocation();
 
 
    /**
 
    * @return The invocation as if the selection in the editor was followed by
 
    *        a content assist invocation.
 
    */
 
    JavaContentAssistInvocationContext getInvocationContext();
 
 
    /**
 
    * @return The selected java element's AST node.
 
    */
 
    ASTNode getAstNode();
 
 
}
 
</source>
 

Latest revision as of 02:30, 26 September 2013

Back to the top