本文整理了Java中org.netbeans.editor.Utilities.setStatusBoldText()
方法的一些代码示例,展示了Utilities.setStatusBoldText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.setStatusBoldText()
方法的具体详情如下:
包路径:org.netbeans.editor.Utilities
类名称:Utilities
方法名:setStatusBoldText
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
private void notFound(JTextComponent target) {
Utilities.setStatusBoldText(target, NbBundle.getMessage(GotoActionView.class, "ControllerNotFound"));
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
private void actionPerformed(final JTextComponent target, final FileObject fo) {
if (fo != null) {
// TODO - Look up project and complain if it's not a Rails project
// See if it's a controller:
if (fo.getName().endsWith("_controller")) { // NOI18N
gotoView(target, fo, "_controller", "controllers"); // NOI18N
} else if (fo.getName().endsWith("_helper")) { // NOI18N
gotoView(target, fo, "_helper", "helpers"); // NOI18N
} else if (isModel(fo)) { // possibly an action mailer model class
gotoView(target, fo, "", "models"); // NOI18N
} else {
if (RubyUtils.isRhtmlFile(fo)) {
gotoAction(target, fo);
} else {
String ext = fo.getExt();
for (String e : RubyUtils.RUBY_VIEW_EXTS) {
if (ext.equalsIgnoreCase(e)) {
gotoAction(target, fo);
return;
}
}
Utilities.setStatusBoldText(target,
NbBundle.getMessage(GotoActionView.class, "AppliesToControllers"));
}
}
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
private void gotoAction(JTextComponent target, FileObject file) {
// This should be a view.
String ext = file.getExt();
boolean found = false;
for (String e : RubyUtils.RUBY_VIEW_EXTS) {
if (ext.equalsIgnoreCase(e)) {
found = true;
break;
}
}
if (!RubyUtils.isRhtmlFile(file) && !found) {
Utilities.setStatusBoldText(target, NbBundle.getMessage(GotoActionView.class, "AppliesToViews"));
return;
}
FileObject controllerFile = RubyUtils.getRailsControllerFor(file);
String action = getActionName(file);
if (controllerFile == null) {
notFound(target);
return;
}
// TODO: Find the position of the #view method
int offset = AstUtilities.findOffset(controllerFile, action);
GsfUtilities.open(controllerFile, offset, "def " + action); // NOI18N
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-refactoring
public static void invokeInstantRename(JTextComponent target) {
try {
final int caret = target.getCaretPosition();
Document doc = target.getDocument();
DataObject dobj = NbEditorUtilities.getDataObject(doc);
CsmFile file = CsmUtilities.getCsmFile(dobj, false, false);
if (file == null) {
Utilities.setStatusBoldText(target, getString("no-instant-rename")); // NOI18N
return;
}
CsmReference ref = CsmReferenceResolver.getDefault().findReference(file, doc, caret);
if (ref == null) {
Utilities.setStatusBoldText(target, getString("no-instant-rename")); // NOI18N
return;
}
boolean doFullRename = true;
if (allowInstantRename(ref, dobj.getPrimaryFile())) {
Collection<CsmReference> changePoints = computeChangePoints(ref);
if (!changePoints.isEmpty()) {
doFullRename = false;
doInstantRename(changePoints, target, caret);
}
}
if (doFullRename) {
doFullRename(dobj, target);
}
} catch (BadLocationException e) {
Exceptions.printStackTrace(e);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
/**
* Move from something like app/controllers/credit_card_controller.rb#debit()
* to app/views/credit_card/debit.rhtml
*/
private void gotoView(JTextComponent target, FileObject file, String fileSuffix, String parentAppDir) {
// This should be a view.
if (!file.getName().endsWith(fileSuffix) && !isModel(file)) {
Utilities.setStatusBoldText(target, NbBundle.getMessage(GotoActionView.class, "AppliesToActions"));
return;
}
FileObject controllerFile = file;
int offset = 0;
// Find the offset of the file we're in, if any
if (target.getCaret() != null) {
offset = target.getCaret().getDot();
}
// Get the name of the method corresponding to the offset
String methodName = AstUtilities.getMethodName(controllerFile, offset);
FileObject viewFile = RubyUtils.getRailsViewFor(file, methodName, fileSuffix, parentAppDir, false);
if (viewFile == null) {
notFound(target);
} else {
GsfUtilities.open(viewFile, 0, null);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-refactoring
private static void doFullRename(DataObject dobj, JTextComponent target) {
EditorCookie ec = dobj.getCookie(EditorCookie.class);
Node n = dobj.getNodeDelegate();
if (n == null) {
Utilities.setStatusBoldText(target, getString("no-instant-rename")); // NOI18N
return;
}
InstanceContent ic = new InstanceContent();
if (ec != null) {
ic.add(ec);
}
ic.add(n);
Lookup actionContext = new AbstractLookup(ic);
Action a = RefactoringActionsFactory.renameAction().createContextAwareInstance(actionContext);
a.actionPerformed(RefactoringActionsFactory.DEFAULT_EVENT);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-project
mostRecentMessage = message;
if (isError()) {
org.netbeans.editor.Utilities.setStatusBoldText(pane, message);
} else {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf
Utilities.setStatusBoldText(target, "Cannot perform rename here.");
Utilities.setStatusBoldText(target, "Scanning In Progress");
Utilities.setStatusBoldText(target, message[0]);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
: LocaleSupport.getString(WRAP_START_LOCALE);
Utilities.setStatusBoldText(c, msg);
} else {
Utilities.setStatusText(c, msg);
Utilities.setStatusBoldText(c, exp + LocaleSupport.getString(
NOT_FOUND_LOCALE));
代码示例来源:origin: net.java.abeille/abeille
msg += back ? LocaleSupport.getString(WRAP_END_LOCALE) : LocaleSupport.getString(WRAP_START_LOCALE);
Utilities.setStatusBoldText(c, msg);
Utilities.setStatusBoldText(c, exp + LocaleSupport.getString(NOT_FOUND_LOCALE));
内容来源于网络,如有侵权,请联系作者删除!