本文整理匯總了Java中org.openide.util.Utilities.OS_SUNOS屬性的典型用法代碼示例。如果您正苦於以下問題:Java Utilities.OS_SUNOS屬性的具體用法?Java Utilities.OS_SUNOS怎麽用?Java Utilities.OS_SUNOS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.openide.util.Utilities
的用法示例。
在下文中一共展示了Utilities.OS_SUNOS屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isPlatformDir
private boolean isPlatformDir ( File f ) {
//XXX: Workaround of hard NFS mounts on Solaris.
final int osId = Utilities.getOperatingSystem();
if (osId == Utilities.OS_SOLARIS || osId == Utilities.OS_SUNOS) {
return false;
}
FileObject fo = (f != null) ? convertToValidDir(f) : null;
if (fo != null) {
//XXX: Workaround of /net folder on Unix, the folders in the root are not badged as platforms.
// User can still select them.
try {
if (Utilities.isUnix() && (fo.getParent() == null || fo.getFileSystem().getRoot().equals(fo.getParent()))) {
return false;
}
} catch (FileStateInvalidException e) {
return false;
}
if (this.platformInstall.accept(fo)) {
return true;
}
}
return false;
}
示例2: newObjectNameFocusGained
private void newObjectNameFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_newObjectNameFocusGained
if (
Utilities.getOperatingSystem() == Utilities.OS_SOLARIS ||
Utilities.getOperatingSystem() == Utilities.OS_SUNOS
) {
// does not work on CDE window manager, so better do nothin
return;
}
newObjectName.selectAll ();
}
示例3: isEJDK
static boolean isEJDK(@NonNull final File folder) {
//XXX: Workaround of hard NFS mounts on Solaris.
final int osId = Utilities.getOperatingSystem();
if (osId == Utilities.OS_SOLARIS || osId == Utilities.OS_SUNOS) {
return false;
}
final String jrecreateName = Utilities.isWindows() ?
"jrecreate.bat" : //NOI18N
"jrecreate.sh"; //NOI18N
final File jrecreate = new File(
new File(folder, "bin"), //NOI18N
jrecreateName);
return jrecreate.exists();
}
示例4: testStructureFullOfFormFiles
public void testStructureFullOfFormFiles() throws Exception {
if ((
Utilities.getOperatingSystem() &
(Utilities.OS_SOLARIS | Utilities.OS_SUNOS)
) != 0) {
LOG.log(Level.CONFIG, "Giving up, this test fails too randomly on Solaris");
return;
}
Children ch = new Children.Array();
Node root = new AbstractNode(ch);
root.setName(getName());
ch.add(nodeWith("A", "-A", "-B", "B"));
ch.add(nodeWith("X", "Y", "Z"));
final Node first = ch.getNodes()[0];
LOG.log(Level.INFO, "Nodes are ready: {0}", root);
final ExplorerManager em = testWindow.getExplorerManager();
em.setRootContext(root);
LOG.info("setRootContext done");
em.setSelectedNodes(new Node[] { first });
LOG.log(Level.INFO, "setSelectedNodes to {0}", first);
LOG.log(Level.INFO, "Verify setSelectedNodes: {0}", Arrays.asList(em.getSelectedNodes()));
EventQueue.invokeAndWait(new Runnable() {
@Override
public void run() {
TreePath path = treeView.tree.getSelectionPath();
LOG.log(Level.INFO, "getSelectionPath {0}", path);
LOG.log(Level.INFO, "getSelectedNodes {0}", Arrays.toString(em.getSelectedNodes()));
assertNotNull("Something is selected", path);
Node node = Visualizer.findNode(path.getLastPathComponent());
assertEquals("It is the first node", first, node);
}
});
sendAction("expand");
sendAction("selectNext");
assertEquals("Explored context is N0", first, em.getExploredContext());
assertEquals("Selected node is A", 1, em.getSelectedNodes().length);
assertEquals("Selected node is A", "A", em.getSelectedNodes()[0].getName());
sendAction(enter);
Keys keys = (Keys)first.getChildren();
assertEquals("One invocation", 1, keys.actionPerformed);
assertFalse("No write access", keys.writeAccess);
assertFalse("No read access", keys.readAccess);
}