本文整理汇总了Java中org.netbeans.spi.editor.fold.FoldManager类的典型用法代码示例。如果您正苦于以下问题:Java FoldManager类的具体用法?Java FoldManager怎么用?Java FoldManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FoldManager类属于org.netbeans.spi.editor.fold包,在下文中一共展示了FoldManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getFoldOperation
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
private static FoldOperation getFoldOperation(FoldManager m) {
if (!(m instanceof FM)) {
return null;
} else {
return ((FM)m).operation;
}
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:ParsingFoldSupport.java
示例2: removeManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
synchronized void removeManager(FoldManager m) {
for (Iterator<Reference<FoldManager>> it = managers.iterator(); it.hasNext(); ) {
Reference<FoldManager> ref = it.next();
FoldManager x = ref.get();
if (x == null) {
it.remove();
} else if (x == m) {
it.remove();
break;
}
}
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:ParsingFoldSupport.java
示例3: getManagers
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
synchronized List<FoldManager> getManagers() {
List<FoldManager> live = new ArrayList<>(managers.size());
for (Iterator<Reference<FoldManager>> it = managers.iterator(); it.hasNext(); ) {
Reference<FoldManager> ref = it.next();
FoldManager x = ref.get();
if (x == null) {
it.remove();
} else {
live.add(x);
}
}
return live;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:ParsingFoldSupport.java
示例4: addFoldManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public FileData addFoldManager(FileObject f, FoldManager m) {
if (f == null) {
return null;
}
FileData fd = getFileData(f);
fd.addManager(m);
return fd;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:ParsingFoldSupport.java
示例5: FoldOperationImpl
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public FoldOperationImpl(FoldHierarchyExecution execution,
FoldManager manager, int priority) {
this.execution = execution;
this.manager = manager;
this.priority = priority;
this.operation = SpiPackageAccessor.get().createFoldOperation(this);
if (manager != null) { // manager for root-fold is null
manager.init(getOperation());
}
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:FoldOperationImpl.java
示例6: setUp
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public void setUp() throws Exception {
super.setUp();
manager = new TestFoldManager();
class FMF implements FoldManagerFactory {
@Override
public FoldManager createFoldManager() {
return manager;
}
}
final FoldHierarchyTestEnv env = new FoldHierarchyTestEnv(
new FMF()
);
doc = env.getDocument();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 20; i++) {
sb.append("12345678901234567890");
}
doc.insertString(0, sb.toString(), null);
hierarchy = env.getHierarchy();
fold35 = FoldUtilities.findOffsetFold(hierarchy, 35);
fold90 = FoldUtilities.findOffsetFold(hierarchy, 90);
fold102 = FoldUtilities.findOffsetFold(hierarchy, 102);
hierarchy.collapse(fold35);
hierarchy.collapse(fold90);
hierarchy.addFoldHierarchyListener(this);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:FoldGuardTest.java
示例7: setUp
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public void setUp() throws Exception {
super.setUp();
Lookup.getDefault();
prepareTest(new String[] {
"/org/netbeans/modules/editor/resources/layer.xml",
"/META-INF/generated-layer.xml",
"/org/netbeans/modules/defaults/mf-layer.xml",
},
new Object[0]);
// hack:
MimeLookup.getLookup("").lookup(FoldHierarchyMonitor.class);
env = new FoldHierarchyTestEnv(new FoldManagerFactory() {
@Override
public FoldManager createFoldManager() {
return fm = new FM();
}
});
pane = env.getPane();
env.getPane().setEditorKit(new Kit());
env.getDocument().insertString(0, "123456789-123456789-123 aa 89-123456789-1234567890", null);
// ensure initialized
env.getHierarchy();
// cannot be done in FoldManager, as setEditorKit() will replace document and reinitialize folds in 2nd thread, which may
// complete even faster than insertString(), so BLE could be thrown.
FoldHierarchyTransaction tran = fm.op.openTransaction();
fm.op.addToHierarchy(
FT,
"",
true,
10,
40,
1, 1,
null,
tran);
tran.commit();
fold = FoldUtilities.findOffsetFold(env.getHierarchy(), 25);
// get x/y of the folded part:
JFrame fr = new JFrame("test");
fr.setBounds(0, 0, 400, 100);
fr.add(pane);
fr.setVisible(true);
delegate = (Callable<Boolean>)pane.getClientProperty("org.netbeans.api.fold.expander");
pane.putClientProperty("org.netbeans.api.fold.expander", new Callable<Boolean>() {
public Boolean call() throws Exception {
return retValue = delegate.call();
}
public boolean equals(Object o) {
return retValue = delegate.equals(o);
}
});
pane.requestFocus();
selectWordCalled = false;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:58,代码来源:BaseCaretTest.java
示例8: createFoldManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public FoldManager createFoldManager() {
return new CustomFoldManager();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:CustomFoldManager.java
示例9: createFoldManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public FoldManager createFoldManager () {
return new LanguagesFoldManager ();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:LanguagesFoldManager.java
示例10: createFoldManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public FoldManager createFoldManager() {
return new GsfFoldManager();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:GsfFoldManagerFactory.java
示例11: createFoldManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
@Override
public FoldManager createFoldManager() {
return new ConsoleFoldManager();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:ConsoleFoldManager.java
示例12: createFoldManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public FoldManager createFoldManager() {
return new JavaElementFoldManager();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:JavaElementFoldManagerFactory.java
示例13: setManagersAndCarets
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
synchronized void setManagersAndCarets(List<FoldManager> mgrs, int[] poss) {
this.mgrsToUpdate = mgrs.iterator();
this.caretPositions = poss;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:ParsingFoldSupport.java
示例14: createFoldManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
@Override
public final FoldManager createFoldManager() {
return new FM(getRegistrar(this));
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:ParsingFoldSupport.java
示例15: addManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
synchronized void addManager(FoldManager m) {
managers.add(new WeakReference(m));
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:ParsingFoldSupport.java
示例16: removeFoldManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public void removeFoldManager(FileObject f, FoldManager m) {
if (f == null) {
return;
}
getFileData(f).removeManager(m);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:ParsingFoldSupport.java
示例17: getFoldManagers
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public Collection<FoldManager> getFoldManagers(FileObject f) {
return getFileData(f).getManagers();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:ParsingFoldSupport.java
示例18: createFoldManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public FoldManager createFoldManager() {
return new XmlFoldManager();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:XmlFoldManagerFactory.java
示例19: getManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
private FoldManager getManager(Fold fold) {
return getOperation(fold).getManager();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:FoldHierarchyTransactionImpl.java
示例20: getManager
import org.netbeans.spi.editor.fold.FoldManager; //导入依赖的package包/类
public FoldManager getManager() {
return manager;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:FoldOperationImpl.java
注:本文中的org.netbeans.spi.editor.fold.FoldManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论