एक रंगीन पृष्ठभूमि की इस तरह पाने के लिए आपको मार्करों और MarkerAnnotationSpecification उपयोग करने के लिए की जरूरत है। आप उन्हें कैसे उपयोग करने के लिए यहाँ मिलेगा: http://cubussapiens.hu/2011/05/custom-markers-and-annotations-the-bright-side-of-eclipse/
कैसे निजी, सार्वजनिक क्षेत्रों को खोजने के लिए के रूप में, आप जावा फ़ाइल को पार्स और सभी जानकारी प्राप्त करने के जेडीटी प्लगइन और AST पार्सर उपयोग करने की आवश्यकता जो आपको चाहिये। मैं इस पर शुरू करने के लिए एक छोटा कोड स्निपेट जोड़ रहा हूं।
ASTParser parser = ASTParser.newParser(AST_LEVEL);
parser.setSource(cmpUnit);
parser.setResolveBindings(true);
CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
AST ast = astRoot.getAST();
TypeDeclaration javaType = null;
Object type = astRoot.types().get(0);
if (type instanceof TypeDeclaration) {
javaType = ((TypeDeclaration) type);
}
List<FieldDeclarationInfo> fieldDeclarations = new ArrayList<FieldDeclarationInfo>();
// Get the field info
for (FieldDeclaration fieldDeclaration : javaType.getFields()) {
// From this object you can recover all the information that you want about the fields.
}
यहाँ cmpUnit
जावा फ़ाइल का ICompilationUnit
है।
एक बहुत अजीब अनुरोध है, लेकिन यह देखने के लिए दिलचस्प है कि इसके लिए कोई समाधान है या नहीं। – GGrec
वास्तव में सहायक हो सकता है, ... –