}
@Override
public Operation[] getOperations(String url, final int lineNumber,
final BytecodeProvider bytecodeProvider) {
DataObject dataObject = getDataObject(url);
if (dataObject == null) {
return null;
}
FileObject fileObject = dataObject.getPrimaryFile();
if (fileObject == null) {
return null;
}
if (!"text/x-scala".equals(fileObject.getMIMEType())) {
return null;
}
// at the following step, do not return null to avoid another EditorContextImpl to process
final Operation ops[][] = new Operation[1][];
Source source = Source.create(dataObject.getPrimaryFile());
if (source == null) {
return ops[0];
}
EditorCookie ec = (EditorCookie) dataObject.getLookup().lookup(EditorCookie.class);
if (ec == null) {
return ops[0];
}
final StyledDocument doc;
try {