super(); mProcessor = processor;
// TODO auto edit strategies for android xml return super.getAutoEditStrategies(sourceViewer, contentType);
Returns the content assist processors that will be used for content assist in the given source viewer and for the given partition type.paramsourceViewer the source viewer to be configured by this configurationparampartitionType the partition type for which the content assist processors are applicablereturnIContentAssistProcessors or null if should not be supported ArrayList<IContentAssistProcessor> processors = new ArrayList<IContentAssistProcessor>(); if (partitionType == IStructuredPartitions.UNKNOWN_PARTITION || partitionType == IStructuredPartitions.DEFAULT_PARTITION || partitionType == IXMLPartitions.XML_DEFAULT) { if (sourceViewer instanceof IInputProvider) { IInputProvider input = (IInputProvider) sourceViewer; Object a = input.getInput(); if (a != null) a.toString(); } IDocument doc = sourceViewer.getDocument(); if (doc != null) doc.toString(); processors.add(mProcessor); } IContentAssistProcessor[] others = super.getContentAssistProcessors(sourceViewer, partitionType); if (others != null && others.length > 0) { for (IContentAssistProcessor p : others) { processors.add(p); } } if (processors.size() > 0) { return processors.toArray(new IContentAssistProcessor[processors.size()]); } else { return null; }
ArrayList<IContentAssistProcessor> processors = new ArrayList<IContentAssistProcessor>(); if (partitionType == IStructuredPartitions.UNKNOWN_PARTITION || partitionType == IStructuredPartitions.DEFAULT_PARTITION || partitionType == IXMLPartitions.XML_DEFAULT) { if (sourceViewer instanceof IInputProvider) { IInputProvider input = (IInputProvider) sourceViewer; Object a = input.getInput(); if (a != null) a.toString(); } IDocument doc = sourceViewer.getDocument(); if (doc != null) doc.toString(); processors.add(mProcessor); } IContentAssistProcessor[] others = super.getContentAssistProcessors(sourceViewer, partitionType); if (others != null && others.length > 0) { for (IContentAssistProcessor p : others) { processors.add(p); } } if (processors.size() > 0) { return processors.toArray(new IContentAssistProcessor[processors.size()]); } else { return null; }
return super.getContentAssistant(sourceViewer);
// TODO content formatter for android xml return super.getContentFormatter(sourceViewer);
// TODO text hover for android xml return super.getTextHover(sourceViewer, contentType);