mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
4a97e80fb5
commit
0823fc1277
2 changed files with 9 additions and 18 deletions
|
@ -20,21 +20,17 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTQualifiedName;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTQualifiedName;
|
||||||
|
|
||||||
|
|
||||||
public class GetterSetterInsertEditProvider implements Comparable<GetterSetterInsertEditProvider>{
|
public class GetterSetterInsertEditProvider implements Comparable<GetterSetterInsertEditProvider>{
|
||||||
public enum Type {
|
public enum Type {
|
||||||
getter,
|
getter,
|
||||||
setter;
|
setter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private IASTSimpleDeclaration functionDeclaration;
|
private IASTSimpleDeclaration functionDeclaration;
|
||||||
private Type type;
|
private Type type;
|
||||||
private String name;
|
private String name;
|
||||||
private IASTSimpleDeclaration fieldDeclaration;
|
private IASTSimpleDeclaration fieldDeclaration;
|
||||||
|
|
||||||
|
|
||||||
public GetterSetterInsertEditProvider(String name, IASTSimpleDeclaration fieldDeclaration, Type type) {
|
public GetterSetterInsertEditProvider(String name, IASTSimpleDeclaration fieldDeclaration, Type type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case getter:
|
case getter:
|
||||||
|
@ -103,6 +99,4 @@ public class GetterSetterInsertEditProvider implements Comparable<GetterSetterIn
|
||||||
public int compareTo(GetterSetterInsertEditProvider o) {
|
public int compareTo(GetterSetterInsertEditProvider o) {
|
||||||
return toString().compareTo(o.toString());
|
return toString().compareTo(o.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,17 +20,14 @@ import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Emanuel Graf IFS
|
* @author Emanuel Graf IFS
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class GetterSetterLabelProvider extends LabelProvider {
|
public class GetterSetterLabelProvider extends LabelProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Image getImage(Object element) {
|
public Image getImage(Object element) {
|
||||||
if(element != null) {
|
|
||||||
if (element instanceof GetterSetterInsertEditProvider) {
|
if (element instanceof GetterSetterInsertEditProvider) {
|
||||||
return CElementImageProvider.getMethodImageDescriptor(ASTAccessVisibility.PUBLIC).createImage();
|
return CElementImageProvider.getMethodImageDescriptor(ASTAccessVisibility.PUBLIC).createImage();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue