bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
1,122,398
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
1,122,399
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(serviceFactory.getConstructorArgNames()), Collections.EMPTY_SET, referenceInfos); }
1,122,400
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, referenceInfos); }
public static GBeanInfo createGBeanInfo(GBeanDefinition gBeanDefinition) { // add the normal properties Set attributeInfos = new HashSet(); PropertyValue[] properties = gBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < properties.length; i++) { PropertyValue propertyValue = properties[i]; attributeInfos.add(new GAttributeInfo(propertyValue.getName(), "java.lang.Object", true, null, null)); } // add the dynamic properties PropertyValue[] dynamicProperties = gBeanDefinition.getDynamicPropertyValues().getPropertyValues(); for (int i = 0; i < dynamicProperties.length; i++) { PropertyValue dynamicPropertyValue = dynamicProperties[i]; attributeInfos.add(new DynamicGAttributeInfo(dynamicPropertyValue.getName(), "java.lang.Object", true, true, true)); } // add the constructor arguments int maxIndex = -1; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().keySet().iterator(); iterator.hasNext();) { int index = ((Integer) iterator.next()).intValue(); if (index > maxIndex) maxIndex = index; } String[] constructorArgs = new String[maxIndex + 1]; for (Iterator iterator = gBeanDefinition.getConstructorArgumentValues().getIndexedArgumentValues().entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); int index = ((Integer) entry.getKey()).intValue(); ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) entry.getValue(); String constructorArgName; if (valueHolder instanceof NamedValueHolder) { NamedValueHolder namedValueHolder = (NamedValueHolder) valueHolder; constructorArgName = namedValueHolder.getName(); } else { constructorArgName = "constructor-argument-" + index; } attributeInfos.add(new GAttributeInfo(constructorArgName, valueHolder.getType(), true, null, null)); constructorArgs[index] = constructorArgName; } // add the dependencies Set referenceInfos = new HashSet(); String[] dependsOn = gBeanDefinition.getDependsOn(); for (int i = 0; i < dependsOn.length; i++) { Map map = stringToDependency(dependsOn[i]); String dependencyName = (String) map.keySet().iterator().next(); referenceInfos.add(new GReferenceInfo("@" + dependencyName, DependencyOnly.class.getName(), DependencyOnly.class.getName(), null, null)); } return new GBeanInfo(gBeanDefinition.getBeanClassName(), "GBean", attributeInfos, new GConstructorInfo(constructorArgs), Collections.EMPTY_SET, null); }
1,122,401
private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexp); cr.accept(cv, false); } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexp); cr.accept(cv, false); } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
1,122,402
private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexp); cr.accept(cv, false); } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } if (!isClass(file)) { } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexp); cr.accept(cv, false); } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
1,122,403
private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexp); cr.accept(cv, false); } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } else if (isArchive(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexp); cr.accept(cv, false); } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
1,122,404
private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexp); cr.accept(cv, false); } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexp); cr.accept(cv, false); } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn( "Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { } } } }
1,122,405
public ClassInstrumenter(ProjectData projectData, final ClassVisitor cv, Pattern ignoreRegexp) { super(cv); this.projectData = projectData; this.ignoreRegex = ignoreRegexp; }
public ClassInstrumenter(ProjectData projectData, final ClassVisitor cv, final Collection ignoreRegexs) { super(cv); this.projectData = projectData; this.ignoreRegex = ignoreRegexp; }
1,122,406
public ClassInstrumenter(ProjectData projectData, final ClassVisitor cv, Pattern ignoreRegexp) { super(cv); this.projectData = projectData; this.ignoreRegex = ignoreRegexp; }
public ClassInstrumenter(ProjectData projectData, final ClassVisitor cv, Pattern ignoreRegexp) { super(cv); this.projectData = projectData; this.ignoreRegexs = ignoreRegexs; }
1,122,407
public void connectionClosedOnError(final Exception ex) { SwingUtilities.invokeLater(new Runnable() { public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error = xmppEx.getStreamError(); String reason = error.getCode(); if ("conflict".equals(reason)) { message = "Your connection was closed due to the same user logging in from another location."; } } Collection rooms = SparkManager.getChatManager().getChatContainer().getChatRooms(); Iterator iter = rooms.iterator(); while (iter.hasNext()) { ChatRoom chatRoom = (ChatRoom)iter.next(); chatRoom.getChatInputEditor().setEnabled(false); chatRoom.getSendButton().setEnabled(false); chatRoom.getTranscriptWindow().insertNotificationMessage(message); } } }); }
public void connectionClosedOnError(final Exception ex) { SwingUtilities.invokeLater(new Runnable() { public void run() { Log.error("Connection closed on error.", ex); String message = Res.getString("message.disconnected.error"); if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error = xmppEx.getStreamError(); String reason = error.getCode(); if ("conflict".equals(reason)) { message = "Your connection was closed due to the same user logging in from another location."; } } Collection rooms = SparkManager.getChatManager().getChatContainer().getChatRooms(); Iterator iter = rooms.iterator(); while (iter.hasNext()) { ChatRoom chatRoom = (ChatRoom)iter.next(); chatRoom.getChatInputEditor().setEnabled(false); chatRoom.getSendButton().setEnabled(false); chatRoom.getTranscriptWindow().insertNotificationMessage(message); } } }); }
1,122,408
public void connectionClosedOnError(final Exception ex) { SwingUtilities.invokeLater(new Runnable() { public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error = xmppEx.getStreamError(); String reason = error.getCode(); if ("conflict".equals(reason)) { message = "Your connection was closed due to the same user logging in from another location."; } } Collection rooms = SparkManager.getChatManager().getChatContainer().getChatRooms(); Iterator iter = rooms.iterator(); while (iter.hasNext()) { ChatRoom chatRoom = (ChatRoom)iter.next(); chatRoom.getChatInputEditor().setEnabled(false); chatRoom.getSendButton().setEnabled(false); chatRoom.getTranscriptWindow().insertNotificationMessage(message); } } }); }
public void connectionClosedOnError(final Exception ex) { SwingUtilities.invokeLater(new Runnable() { public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error = xmppEx.getStreamError(); String reason = error.getCode(); if ("conflict".equals(reason)) { message = Res.getString("message.disconnected.conflict.error"); } } Collection rooms = SparkManager.getChatManager().getChatContainer().getChatRooms(); Iterator iter = rooms.iterator(); while (iter.hasNext()) { ChatRoom chatRoom = (ChatRoom)iter.next(); chatRoom.getChatInputEditor().setEnabled(false); chatRoom.getSendButton().setEnabled(false); chatRoom.getTranscriptWindow().insertNotificationMessage(message); } } }); }
1,122,409
public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error = xmppEx.getStreamError(); String reason = error.getCode(); if ("conflict".equals(reason)) { message = "Your connection was closed due to the same user logging in from another location."; } } Collection rooms = SparkManager.getChatManager().getChatContainer().getChatRooms(); Iterator iter = rooms.iterator(); while (iter.hasNext()) { ChatRoom chatRoom = (ChatRoom)iter.next(); chatRoom.getChatInputEditor().setEnabled(false); chatRoom.getSendButton().setEnabled(false); chatRoom.getTranscriptWindow().insertNotificationMessage(message); } }
public void run() { Log.error("Connection closed on error.", ex); String message = Res.getString("message.disconnected.error"); if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error = xmppEx.getStreamError(); String reason = error.getCode(); if ("conflict".equals(reason)) { message = "Your connection was closed due to the same user logging in from another location."; } } Collection rooms = SparkManager.getChatManager().getChatContainer().getChatRooms(); Iterator iter = rooms.iterator(); while (iter.hasNext()) { ChatRoom chatRoom = (ChatRoom)iter.next(); chatRoom.getChatInputEditor().setEnabled(false); chatRoom.getSendButton().setEnabled(false); chatRoom.getTranscriptWindow().insertNotificationMessage(message); } }
1,122,410
public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error = xmppEx.getStreamError(); String reason = error.getCode(); if ("conflict".equals(reason)) { message = "Your connection was closed due to the same user logging in from another location."; } } Collection rooms = SparkManager.getChatManager().getChatContainer().getChatRooms(); Iterator iter = rooms.iterator(); while (iter.hasNext()) { ChatRoom chatRoom = (ChatRoom)iter.next(); chatRoom.getChatInputEditor().setEnabled(false); chatRoom.getSendButton().setEnabled(false); chatRoom.getTranscriptWindow().insertNotificationMessage(message); } }
public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error = xmppEx.getStreamError(); String reason = error.getCode(); if ("conflict".equals(reason)) { message = Res.getString("message.disconnected.conflict.error"); } } Collection rooms = SparkManager.getChatManager().getChatContainer().getChatRooms(); Iterator iter = rooms.iterator(); while (iter.hasNext()) { ChatRoom chatRoom = (ChatRoom)iter.next(); chatRoom.getChatInputEditor().setEnabled(false); chatRoom.getSendButton().setEnabled(false); chatRoom.getTranscriptWindow().insertNotificationMessage(message); } }
1,122,411
private void setIdleListener() throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; } long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > delay) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus("User has locked their workstation."); } else { p.setStatus("Away due to idle."); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } } }, 1000, 1000); }
private void setIdleListener() throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; } long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > delay) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus(Res.getString("message.locked.workstation")); } else { p.setStatus("Away due to idle."); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } } }, 1000, 1000); }
1,122,412
private void setIdleListener() throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; } long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > delay) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus("User has locked their workstation."); } else { p.setStatus("Away due to idle."); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } } }, 1000, 1000); }
private void setIdleListener() throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; } long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > delay) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus("User has locked their workstation."); } else { p.setStatus(Res.getString("message.away.idle")); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } } }, 1000, 1000); }
1,122,413
public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; } long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > delay) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus("User has locked their workstation."); } else { p.setStatus("Away due to idle."); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } }
public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; } long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > delay) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus(Res.getString("message.locked.workstation")); } else { p.setStatus("Away due to idle."); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } }
1,122,414
public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; } long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > delay) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus("User has locked their workstation."); } else { p.setStatus("Away due to idle."); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } }
public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.isIdleOn()) { delay = localPref.getIdleTime() * 60000; } else { return; } long idleTime = SystemInfo.getSessionIdleTime(); boolean isLocked = SystemInfo.isSessionLocked(); if (idleTime > delay) { try { // Handle if spark is not connected to the server. if (SparkManager.getConnection() == null || !SparkManager.getConnection().isConnected()) { return; } // Change Status Workspace workspace = SparkManager.getWorkspace(); Presence presence = workspace.getStatusBar().getPresence(); if (workspace != null && presence.getMode() == Presence.Mode.available) { unavaliable = true; StatusItem away = workspace.getStatusBar().getStatusItem("Away"); Presence p = away.getPresence(); if (isLocked) { p.setStatus("User has locked their workstation."); } else { p.setStatus(Res.getString("message.away.idle")); } previousPriority = presence.getPriority(); p.setPriority(0); SparkManager.getSessionManager().changePresence(p); } } catch (Exception e) { Log.error("Error with IDLE status.", e); timer.cancel(); } } else { if (unavaliable) { setAvailableIfActive(); } } }
1,122,415
public StatusItem getStatusItem(String label) { Iterator iter = dndList.iterator(); while (iter.hasNext()) { StatusItem item = (StatusItem)iter.next(); if (item.getText().equals(label)) { return item; } } return null; }
public StatusItem getStatusItem(String label) { Iterator iter = statusList.iterator(); while (iter.hasNext()) { StatusItem item = (StatusItem)iter.next(); if (item.getText().equals(label)) { return item; } } return null; }
1,122,416
private void dumpPackage(Package pack) { println("<package name=\"" + pack.getName() + "\"" + " line-rate=\"" + pack.getLineCoverageRate() + "\"" + " branch-rate=\"" + pack.getBranchCoverageRate() + "\"" + ">"); increaseIndentation(); dumpClasses((Clazz[])pack.getClasses().toArray( new Clazz[pack.getClasses().size()])); }
private void dumpPackage(Package pack) { println("<package name=\"" + pack.getName() + "\"" + " line-rate=\"" + pack.getLineCoverageRate() + "\"" + " branch-rate=\"" + pack.getBranchCoverageRate() + "\"" + ">"); increaseIndentation(); dumpClasses((Clazz[])pack.getClasses().toArray( new Clazz[pack.getClasses().size()])); }
1,122,417
private void dumpPackages(Coverage coverage) { Iterator it = coverage.getPackages().iterator(); while (it.hasNext()) { dumpPackage((Package)it.next()); } }
private void dumpPackages(CoverageReport coverage) { Iterator it = coverage.getPackages().iterator(); while (it.hasNext()) { dumpPackage((Package)it.next()); } }
1,122,418
public double getLineCoverageRate() { if (numberOfLines == 0) { return 1; } return (double)numberOfCoveredLines / (double)numberOfLines; }
public double getLineCoverageRate() { if (getNumberOfLines() == 0) { return 1; } return (double)numberOfCoveredLines / (double)numberOfLines; }
1,122,419
public double getLineCoverageRate() { if (numberOfLines == 0) { return 1; } return (double)numberOfCoveredLines / (double)numberOfLines; }
public double getLineCoverageRate() { if (numberOfLines == 0) { return 1; } return (double)getNumberOfCoveredLines() / (double)getNumberOfLines(); }
1,122,420
public double getBranchCoverageRate() { if (numberOfBranches == 0) { if (numberOfCoveredLines == 0) { return 0; } return 1; } return (double)numberOfCoveredBranches / (double)numberOfBranches; }
public double getBranchCoverageRate() { if (getNumberOfBranches() == 0) { if (numberOfCoveredLines == 0) { return 0; } return 1; } return (double)numberOfCoveredBranches / (double)numberOfBranches; }
1,122,421
public double getBranchCoverageRate() { if (numberOfBranches == 0) { if (numberOfCoveredLines == 0) { return 0; } return 1; } return (double)numberOfCoveredBranches / (double)numberOfBranches; }
public double getBranchCoverageRate() { if (numberOfBranches == 0) { if (getNumberOfCoveredLines() == 0) { return 0; } return 1; } return (double)numberOfCoveredBranches / (double)numberOfBranches; }
1,122,422
public double getBranchCoverageRate() { if (numberOfBranches == 0) { if (numberOfCoveredLines == 0) { return 0; } return 1; } return (double)numberOfCoveredBranches / (double)numberOfBranches; }
public double getBranchCoverageRate() { if (numberOfBranches == 0) { if (numberOfCoveredLines == 0) { return 0; } return 1; } return (double)getNumberOfCoveredBranches() / (double)getNumberOfBranches(); }
1,122,423
public static String getVersion() { return "1.1.9.2"; }
public static String getVersion() { return "1.1.9.3"; }
1,122,425
public List listArticles() throws XmlException, IOException{ List list = new ArrayList(); IWContext iwc = IWContext.getInstance(); try { String scope = ArticleUtil.getArticleRootPath(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwc,IWSlideSession.class); if(scope != null){ if(scope.startsWith(session.getWebdavServerURI())){ scope = scope.substring(session.getWebdavServerURI().length()); } if(scope.startsWith("/")){ scope = scope.substring(1); } } ContentSearch searchBusiness = new ContentSearch(iwc.getIWMainApplication()); Search search = searchBusiness.createSearch(getSearchRequest(scope, iwc.getCurrentLocale())); Collection results = search.getSearchResults(); if(results!=null){ for (Iterator iter = results.iterator(); iter.hasNext();) { SearchResult result = (SearchResult) iter.next(); try { System.out.println("Attempting to load "+result.getSearchResultURI()); ArticleItemBean article = new ArticleSearchResultBean(); article.load(result.getSearchResultURI()); list.add(article); }catch(Exception e) { e.printStackTrace(); } } } } catch (SearchException e1) { e1.printStackTrace(); } return list; }
public List listArticles() throws XmlException, IOException{ List list = new ArrayList(); IWContext iwc = IWContext.getInstance(); try { String scope = ArticleUtil.getArticleBaseFolderPath(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwc,IWSlideSession.class); if(scope != null){ if(scope.startsWith(session.getWebdavServerURI())){ scope = scope.substring(session.getWebdavServerURI().length()); } if(scope.startsWith("/")){ scope = scope.substring(1); } } ContentSearch searchBusiness = new ContentSearch(iwc.getIWMainApplication()); Search search = searchBusiness.createSearch(getSearchRequest(scope, iwc.getCurrentLocale())); Collection results = search.getSearchResults(); if(results!=null){ for (Iterator iter = results.iterator(); iter.hasNext();) { SearchResult result = (SearchResult) iter.next(); try { System.out.println("Attempting to load "+result.getSearchResultURI()); ArticleItemBean article = new ArticleSearchResultBean(); article.load(result.getSearchResultURI()); list.add(article); }catch(Exception e) { e.printStackTrace(); } } } } catch (SearchException e1) { e1.printStackTrace(); } return list; }
1,122,426
private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-sourcefiles-" + packageData.getName() + ".html"; double lineCoverage = -1; double branchCoverage = -1; File[] files = finder.findDirectory(packageData.getSourceFileName()); if (files.length == 0) { LOGGER.warn("No directories found for package: " + packageData.getSourceFileName()); } double ccnSum = 0; for (int i = 0; i < files.length; i++) { ccnSum += Util.getCCN(files[i], false); } double ccn = ccnSum / (double) files.length; if (packageData.getNumberOfValidLines() > 0) lineCoverage = packageData.getLineCoverageRate(); if (packageData.getNumberOfValidBranches() > 0) branchCoverage = packageData.getBranchCoverageRate(); ret.append(" <tr>"); ret.append("<td class=\"text\"><a href=\"" + url1 + "\" onClick='parent.sourceFileList.location.href=\"" + url2 + "\"'>" + generatePackageName(packageData) + "</a></td>"); ret.append("<td class=\"value\">" + packageData.getNumberOfChildren() + "</td>"); ret.append(generateTableColumnsFromData(lineCoverage, branchCoverage, ccn)); ret.append("</tr>"); return ret.toString(); }
private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-sourcefiles-" + packageData.getName() + ".html"; double lineCoverage = -1; double branchCoverage = -1; File[] files = finder.findDirectory(packageData.getSourceFileName()); if (files.length == 0) { LOGGER.warn("No directories found for package: " + packageData.getSourceFileName()); } double ccnSum = 0; for (int i = 0; i < files.length; i++) { ccnSum += Util.getCCN(files[i], false); } double ccn = ccnSum / (double) files.length; if (packageData.getNumberOfValidLines() > 0) lineCoverage = packageData.getLineCoverageRate(); if (packageData.getNumberOfValidBranches() > 0) branchCoverage = packageData.getBranchCoverageRate(); ret.append(" <tr>"); ret.append("<td class=\"text\"><a href=\"" + url1 + "\" onClick='parent.sourceFileList.location.href=\"" + url2 + "\"'>" + generatePackageName(packageData) + "</a></td>"); ret.append("<td class=\"value\">" + packageData.getNumberOfChildren() + "</td>"); ret.append(generateTableColumnsFromData(lineCoverage, branchCoverage, ccn)); ret.append("</tr>"); return ret.toString(); }
1,122,428
public HSV(float hs, float ss, float vs, float as) { h = hs; s = ss; v = vs; a = as; }
public HSV() { h = hs; s = ss; v = vs; a = as; }
1,122,429
public HSV(float hs, float ss, float vs, float as) { h = hs; s = ss; v = vs; a = as; }
public HSV(float hs, float ss, float vs, float as) { h = hs; s = ss; v = vs; a = as; }
1,122,430
public NoteTreeNode(Tree parent, Note data) { treeItem = new TreeItem(parent, SWT.NONE); init(data); }
public NoteTreeNode(Tree parent, Note data) { treeItem = new TreeItem(parent, SWT.NONE); init(data); }
1,122,431
public void dispose() { if (displayedNote.getTab() != null) displayedNote.getTab().dispose(); treeItem.dispose(); }
public void dispose() { for (TreeItem childTi : treeItem.getItems()) { ((NoteTreeNode) childTi.getData()).dispose(); } treeItem.dispose(); }
1,122,432
private void init(Note data) { this.displayedNote = new DisplayedNote(this, data); treeItem.setText(data.getName()); treeItem.setData(this); for (Note n : data.getChildren()) { new NoteTreeNode(treeItem, n); } }
private void init(Note data) { this.displayedNote = new DisplayedNote(this, data); treeItem.setText(data.getName()); treeItem.setData(this); for (Note n : data.getChildren()) { new NoteTreeNode(treeItem, n); } }
1,122,433
private void init(Note data) { this.displayedNote = new DisplayedNote(this, data); treeItem.setText(data.getName()); treeItem.setData(this); for (Note n : data.getChildren()) { new NoteTreeNode(treeItem, n); } }
private void init(Note data) { this.displayedNote = new DisplayedNote(this, data); treeItem.setText(data.getName()); treeItem.setData(this); for (Note n : data.getChildren()) { new NoteTreeNode(treeItem, n); } }
1,122,434
public void showRosterDialog() { showRosterDialog(SparkManager.getMainWindow()); }
public void showRosterDialog() { showRosterDialog(SparkManager.getMainWindow()); }
1,122,437
public void updatePresenceIcon(Presence presence) { ChatManager chatManager = SparkManager.getChatManager(); boolean handled = chatManager.fireContactItemPresenceChanged(this, presence); if (handled) { return; } String status = presence != null ? presence.getStatus() : null; Icon statusIcon = SparkRes.getImageIcon(SparkRes.GREEN_BALL); boolean isAvailable = false; if (status == null && presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { status = "Available"; isAvailable = true; } else if (mode == Presence.Mode.away) { status = "I'm away"; statusIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); } else if (mode == Presence.Mode.chat) { status = "I'm free to chat"; } else if (mode == Presence.Mode.dnd) { status = "Do not disturb"; statusIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); } else if (mode == Presence.Mode.xa) { status = "Extended away"; statusIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); } } else if (presence != null && (presence.getMode() == Presence.Mode.dnd || presence.getMode() == Presence.Mode.away || presence.getMode() == Presence.Mode.xa)) { statusIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); } else if (presence != null && presence.getType() == Presence.Type.available) { isAvailable = true; } else if (presence == null) { getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); getNicknameLabel().setForeground((Color)UIManager.get("ContactItemOffline.color")); RosterEntry entry = SparkManager.getConnection().getRoster().getEntry(getFullJID()); if (entry != null && (entry.getType() == RosterPacket.ItemType.NONE || entry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == entry.getStatus()) { // Do not move out of group. setIcon(SparkRes.getImageIcon(SparkRes.SMALL_QUESTION)); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); setStatusText("Pending"); } else { setIcon(null); setFont(new Font("Dialog", Font.PLAIN, 11)); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); setAvailable(false); setStatusText(""); } sideIcon.setIcon(null); setAvailable(false); return; } StatusItem statusItem = SparkManager.getWorkspace().getStatusBar().getItemFromPresence(presence); if (statusItem != null) { setIcon(statusItem.getIcon()); } else { setIcon(statusIcon); } if (status != null) { setStatus(status); } if (status != null && status.indexOf("phone") != -1) { statusIcon = SparkRes.getImageIcon(SparkRes.ON_PHONE_IMAGE); setIcon(statusIcon); } // Always change nickname label to black. getNicknameLabel().setForeground((Color)UIManager.get("ContactItemNickname.foreground")); if (isAvailable) { getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); if ("Online".equals(status) || "Available".equalsIgnoreCase(status)) { setStatusText(""); } else { setStatusText(status); } } else if (presence != null) { getNicknameLabel().setFont(new Font("Dialog", Font.ITALIC, 11)); getNicknameLabel().setForeground(Color.gray); if (status != null) { setStatusText(status); } } setAvailable(true); }
public void updatePresenceIcon(Presence presence) { ChatManager chatManager = SparkManager.getChatManager(); boolean handled = chatManager.fireContactItemPresenceChanged(this, presence); if (handled) { return; } String status = presence != null ? presence.getStatus() : null; Icon statusIcon = SparkRes.getImageIcon(SparkRes.GREEN_BALL); boolean isAvailable = false; if (status == null && presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { status = "Available"; isAvailable = true; } else if (mode == Presence.Mode.away) { status = "I'm away"; statusIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); } else if (mode == Presence.Mode.chat) { status = "I'm free to chat"; } else if (mode == Presence.Mode.dnd) { status = "Do not disturb"; statusIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); } else if (mode == Presence.Mode.xa) { status = "Extended away"; statusIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); } } else if (presence != null && (presence.getMode() == Presence.Mode.dnd || presence.getMode() == Presence.Mode.away || presence.getMode() == Presence.Mode.xa)) { statusIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); } else if (presence != null && presence.getType() == Presence.Type.available) { isAvailable = true; } else if (presence == null) { getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); getNicknameLabel().setForeground((Color)UIManager.get("ContactItemOffline.color")); RosterEntry entry = SparkManager.getConnection().getRoster().getEntry(getFullJID()); if (entry != null && (entry.getType() == RosterPacket.ItemType.NONE || entry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == entry.getStatus()) { // Do not move out of group. setIcon(SparkRes.getImageIcon(SparkRes.SMALL_QUESTION)); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); setStatusText("Pending"); } else { setIcon(null); setFont(new Font("Dialog", Font.PLAIN, 11)); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); setAvailable(false); setStatusText(""); } sideIcon.setIcon(null); setAvailable(false); return; } StatusItem statusItem = SparkManager.getWorkspace().getStatusBar().getItemFromPresence(presence); if (statusItem != null) { setIcon(statusItem.getIcon()); } else { setIcon(statusIcon); } if (status != null) { setStatus(status); } if (status != null && status.toLowerCase().indexOf("phone") != -1) { statusIcon = SparkRes.getImageIcon(SparkRes.ON_PHONE_IMAGE); setIcon(statusIcon); } // Always change nickname label to black. getNicknameLabel().setForeground((Color)UIManager.get("ContactItemNickname.foreground")); if (isAvailable) { getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); if ("Online".equals(status) || "Available".equalsIgnoreCase(status)) { setStatusText(""); } else { setStatusText(status); } } else if (presence != null) { getNicknameLabel().setFont(new Font("Dialog", Font.ITALIC, 11)); getNicknameLabel().setForeground(Color.gray); if (status != null) { setStatusText(status); } } setAvailable(true); }
1,122,438
public Object invoke(ObjectName objectName, String methodName) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.NoSuchOperationException, Exception { boolean running = isRunning(objectName); if (running) { throw new IllegalStateException("Service is not running: name=" + objectName); } ServiceInvoker serviceInvoker = getServiceInvoker(objectName); try { Object value = serviceInvoker.invoke(methodName, NO_ARGS, NO_TYPES); return value; } catch (NoSuchOperationException e) { throw new org.apache.geronimo.kernel.NoSuchOperationException(e); } }
public Object invoke(ObjectName objectName, String methodName) throws org.apache.geronimo.kernel.GBeanNotFoundException, org.apache.geronimo.kernel.NoSuchOperationException, Exception { boolean running = isRunning(objectName); if (!running) { throw new IllegalStateException("Service is not running: name=" + objectName); } ServiceInvoker serviceInvoker = getServiceInvoker(objectName); try { Object value = serviceInvoker.invoke(methodName, NO_ARGS, NO_TYPES); return value; } catch (NoSuchOperationException e) { throw new org.apache.geronimo.kernel.NoSuchOperationException(e); } }
1,122,440
public static String rtrim(String s) { if (s == null) return null; for (int i = s.length() - 1; i > -1; i--) { if (!Character.isWhitespace(s.charAt(i))) return s.substring(0, i); } // if all WS return empty string return ""; }
public static String rtrim(String s) { if (s == null) return null; for (int i = s.length() - 1; i > -1; i--) { if (!Character.isWhitespace(s.charAt(i))) return s.substring(0, i+1); } // if all WS return empty string return ""; }
1,122,441
private UIComponent getDetailPanel() { WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle(); HtmlPanelGrid dp = WFPanelUtil.getPlainFormPanel(1); WFComponentSelector cs = new WFComponentSelector(); cs.setId(COMPONENT_SELECTOR_ID); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(1); p.setId(NO_ARTICLE_ID); p.getChildren().add(localizer.getHeaderTextVB("no_article_selected")); cs.add(p); p = WFPanelUtil.getPlainFormPanel(1); p.setId(ARTICLE_LIST_ID); p.getChildren().add(WFUtil.getHeaderTextVB(ref + "headline")); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.getTextVB(ref + "teaser")); p.getChildren().add(WFUtil.getText(" ")); WFPlainOutputText bodyText = new WFPlainOutputText(); WFUtil.setValueBinding(bodyText, "value", ref + "body"); p.getChildren().add(bodyText); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(new WFPlainOutputText("<hr/>")); UIComponent g = WFUtil.group(localizer.getHeaderTextVB("author"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "author")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("created"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "creationDate")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); HtmlOutputText t = WFUtil.getTextVB(ref + "categoryNames"); t.setConverter(new WFCommaSeparatedListConverter()); g = WFUtil.group(localizer.getHeaderTextVB("categories"), WFUtil.getHeaderText(": ")); g.getChildren().add(t); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("current_version"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "versionId")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("comment"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "comment")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("source"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "source")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); WebDAVFileDetails details = new WebDAVFileDetails(); WFUtil.setValueBinding(details,"currentResourcePath",ref+"resourcePath"); p.getChildren().add(details); cs.add(p); cs.setSelectedId(NO_ARTICLE_ID, true); dp.getChildren().add(cs); return dp; }
private UIComponent getDetailPanel() { WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle(); HtmlPanelGrid dp = WFPanelUtil.getPlainFormPanel(1); WFComponentSelector cs = new WFComponentSelector(); cs.setId(COMPONENT_SELECTOR_ID); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(1); p.setId(NO_ARTICLE_ID); p.getChildren().add(localizer.getHeaderTextVB("no_article_selected")); cs.add(p); p = WFPanelUtil.getPlainFormPanel(1); p.setId(ARTICLE_LIST_ID); p.getChildren().add(WFUtil.getHeaderTextVB(ref + "headline")); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.getTextVB(ref + "teaser")); p.getChildren().add(WFUtil.getText(" ")); WFPlainOutputText bodyText = new WFPlainOutputText(); WFUtil.setValueBinding(bodyText, "value", ref + "body"); p.getChildren().add(bodyText); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(new WFPlainOutputText("<hr/>")); UIComponent g = WFUtil.group(localizer.getHeaderTextVB("author"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "author")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("created"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "creationDate")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); HtmlOutputText t = WFUtil.getTextVB(ref + "categoryNames"); t.setConverter(new WFCommaSeparatedListConverter()); g = WFUtil.group(localizer.getHeaderTextVB("categories"), WFUtil.getHeaderText(": ")); g.getChildren().add(t); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("current_version"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("comment"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "comment")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); g = WFUtil.group(localizer.getHeaderTextVB("source"), WFUtil.getHeaderText(": ")); g.getChildren().add(WFUtil.getTextVB(ref + "source")); p.getChildren().add(g); p.getChildren().add(WFUtil.getText(" ")); WebDAVFileDetails details = new WebDAVFileDetails(); WFUtil.setValueBinding(details,"currentResourcePath",ref+"resourcePath"); p.getChildren().add(details); cs.add(p); cs.setSelectedId(NO_ARTICLE_ID, true); dp.getChildren().add(cs); return dp; }
1,122,442
public FileTemplate(Broker broker, File templateFile) { super(broker); myFile = templateFile; }
public FileTemplate(Broker broker, File templateFile) { super(broker); myFile = templateFile; }
1,122,443
public void execute() throws MojoExecutionException, MojoFailureException { getLog().debug( " ======= XBeanMojo settings =======" ); getLog().debug( "namespace[" + namespace + "]" ); getLog().debug( "srcDir[" + srcDir + "]" ); getLog().debug( "schema[" + schema + "]" ); getLog().debug( "excludedClasses" + excludedClasses ); getLog().debug( "outputDir[" + outputDir + "]" ); getLog().debug( "propertyEditorPaths[" + propertyEditorPaths + "]" ); getLog().debug( "schemaAsArtifact[" + schemaAsArtifact + "]"); if (schema == null) { schema = new File(outputDir, project.getArtifactId() + ".xsd"); } if (propertyEditorPaths != null) { List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); StringTokenizer paths = new StringTokenizer(propertyEditorPaths, " ,"); editorSearchPath.addAll(Collections.list(paths)); PropertyEditorManager.setEditorSearchPath((String[]) editorSearchPath.toArray(new String[editorSearchPath.size()])); } ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); try { schema.getParentFile().mkdirs(); String[] excludedClasses = null; if (this.excludedClasses != null) { excludedClasses = this.excludedClasses.split(" *, *"); } MappingLoader mappingLoader = new QdoxMappingLoader(namespace, new File[] { srcDir }, excludedClasses); GeneratorPlugin[] plugins = new GeneratorPlugin[]{ new XmlMetadataGenerator(outputDir.getAbsolutePath(), schema), new DocumentationGenerator(schema), new XsdGenerator(schema), new WikiDocumentationGenerator(schema), }; // load the mappings Set namespaces = mappingLoader.loadNamespaces(); if (namespaces.isEmpty()) { System.out.println("Warning: no namespaces found!"); } // generate the files for (Iterator iterator = namespaces.iterator(); iterator.hasNext();) { NamespaceMapping namespaceMapping = (NamespaceMapping) iterator.next(); for (int i = 0; i < plugins.length; i++) { GeneratorPlugin plugin = plugins[i]; plugin.setLog(this); plugin.generate(namespaceMapping); } for (Iterator iter = generatorPlugins.iterator(); iter.hasNext();) { GeneratorPlugin plugin = (GeneratorPlugin) iter.next(); plugin.setLog(this); plugin.generate(namespaceMapping); } } // Attach them as artifacts if (schemaAsArtifact) { projectHelper.attachArtifact(project, "xsd", null, schema); projectHelper.attachArtifact(project, "html", "schema", new File(schema.getAbsolutePath() + ".html")); } Resource res = new Resource(); res.setDirectory(outputDir.toString()); project.addResource(res); log("...done."); } catch (Exception e) { throw new BuildException(e); } finally { Thread.currentThread().setContextClassLoader(oldCL); } }
public void execute() throws MojoExecutionException, MojoFailureException { getLog().debug( " ======= XBeanMojo settings =======" ); getLog().debug( "namespace[" + namespace + "]" ); getLog().debug( "srcDir[" + srcDir + "]" ); getLog().debug( "schema[" + schema + "]" ); getLog().debug( "excludedClasses[" + excludedClasses + "]"); getLog().debug( "outputDir[" + outputDir + "]" ); getLog().debug( "propertyEditorPaths[" + propertyEditorPaths + "]" ); getLog().debug( "schemaAsArtifact[" + schemaAsArtifact + "]"); if (schema == null) { schema = new File(outputDir, project.getArtifactId() + ".xsd"); } if (propertyEditorPaths != null) { List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); StringTokenizer paths = new StringTokenizer(propertyEditorPaths, " ,"); editorSearchPath.addAll(Collections.list(paths)); PropertyEditorManager.setEditorSearchPath((String[]) editorSearchPath.toArray(new String[editorSearchPath.size()])); } ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); try { schema.getParentFile().mkdirs(); String[] excludedClasses = null; if (this.excludedClasses != null) { excludedClasses = this.excludedClasses.split(" *, *"); } MappingLoader mappingLoader = new QdoxMappingLoader(namespace, new File[] { srcDir }, excludedClasses); GeneratorPlugin[] plugins = new GeneratorPlugin[]{ new XmlMetadataGenerator(outputDir.getAbsolutePath(), schema), new DocumentationGenerator(schema), new XsdGenerator(schema), new WikiDocumentationGenerator(schema), }; // load the mappings Set namespaces = mappingLoader.loadNamespaces(); if (namespaces.isEmpty()) { System.out.println("Warning: no namespaces found!"); } // generate the files for (Iterator iterator = namespaces.iterator(); iterator.hasNext();) { NamespaceMapping namespaceMapping = (NamespaceMapping) iterator.next(); for (int i = 0; i < plugins.length; i++) { GeneratorPlugin plugin = plugins[i]; plugin.setLog(this); plugin.generate(namespaceMapping); } for (Iterator iter = generatorPlugins.iterator(); iter.hasNext();) { GeneratorPlugin plugin = (GeneratorPlugin) iter.next(); plugin.setLog(this); plugin.generate(namespaceMapping); } } // Attach them as artifacts if (schemaAsArtifact) { projectHelper.attachArtifact(project, "xsd", null, schema); projectHelper.attachArtifact(project, "html", "schema", new File(schema.getAbsolutePath() + ".html")); } Resource res = new Resource(); res.setDirectory(outputDir.toString()); project.addResource(res); log("...done."); } catch (Exception e) { throw new BuildException(e); } finally { Thread.currentThread().setContextClassLoader(oldCL); } }
1,122,444
public EnumIterator (Enumeration e) { enum = e; hasNext = e.hasMoreElements(); }
public EnumIterator (Enumeration e) { enumeration = e; hasNext = e.hasMoreElements(); }
1,122,445
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,446
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,447
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(0, 1); break; case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,448
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,449
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,451
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,452
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(0, 1); break; case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,453
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,454
private final int jjMoveNfa_3(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 31; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 4: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 5; break; case 2: if ((0x3ff000000000000L & l) != 0L) { if (kind > 53) kind = 53; jjCheckNAdd(30); } else if ((0x2400L & l) != 0L) { if (kind > 30) kind = 30; } else if ((0x100000200L & l) != 0L) { if (kind > 29) kind = 29; jjCheckNAdd(7); } else if (curChar == 33) { if (kind > 49) kind = 49; } else if (curChar == 38) jjstateSet[jjnewStateCnt++] = 15; else if (curChar == 60) jjstateSet[jjnewStateCnt++] = 13; else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 33) jjstateSet[jjnewStateCnt++] = 11; else if (curChar == 13) jjstateSet[jjnewStateCnt++] = 8; break; case 0: if (curChar != 35) break; if (kind > 16) kind = 16; jjCheckNAdd(1); break; case 1: if ((0xffffffffffffdbffL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(1); break; case 5: if (curChar == 10 && kind > 21) kind = 21; break; case 6: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 5; break; case 7: if ((0x100000200L & l) == 0L) break; if (kind > 29) kind = 29; jjCheckNAdd(7); break; case 8: if (curChar == 10 && kind > 30) kind = 30; break; case 9: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 8; break; case 10: if ((0x2400L & l) != 0L && kind > 30) kind = 30; break; case 11: if (curChar == 61 && kind > 42) kind = 42; break; case 12: if (curChar == 33) jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 62 && kind > 42) kind = 42; break; case 14: if (curChar == 60) jjstateSet[jjnewStateCnt++] = 13; break; case 15: if (curChar == 38 && kind > 47) kind = 47; break; case 16: if (curChar == 38) jjstateSet[jjnewStateCnt++] = 15; break; case 24: if (curChar == 33 && kind > 49) kind = 49; break; case 29: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 52) kind = 52; jjstateSet[jjnewStateCnt++] = 29; break; case 30: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 53) kind = 53; jjCheckNAdd(30); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 2: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 52) kind = 52; jjCheckNAdd(29); } else if (curChar == 124) jjstateSet[jjnewStateCnt++] = 20; else if (curChar == 92) jjAddStates(4, 5); if (curChar == 78) jjstateSet[jjnewStateCnt++] = 26; else if (curChar == 79) jjstateSet[jjnewStateCnt++] = 22; else if (curChar == 65) jjstateSet[jjnewStateCnt++] = 18; break; case 1: if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 1; break; case 3: if (curChar == 92) jjAddStates(4, 5); break; case 17: if (curChar == 68 && kind > 47) kind = 47; break; case 18: if (curChar == 78) jjstateSet[jjnewStateCnt++] = 17; break; case 19: if (curChar == 65) jjstateSet[jjnewStateCnt++] = 18; break; case 20: if (curChar == 124 && kind > 48) kind = 48; break; case 21: if (curChar == 124) jjstateSet[jjnewStateCnt++] = 20; break; case 22: if (curChar == 82 && kind > 48) kind = 48; break; case 23: if (curChar == 79) jjstateSet[jjnewStateCnt++] = 22; break; case 25: if (curChar == 84 && kind > 49) kind = 49; break; case 26: if (curChar == 79) jjstateSet[jjnewStateCnt++] = 25; break; case 27: if (curChar == 78) jjstateSet[jjnewStateCnt++] = 26; break; case 28: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(29); break; case 29: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(29); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 1: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 1; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 31 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_3(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 31; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 4: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 5; break; case 2: if ((0x3ff000000000000L & l) != 0L) { if (kind > 53) kind = 53; jjCheckNAdd(30); } else if ((0x2400L & l) != 0L) { if (kind > 30) kind = 30; } else if ((0x100000200L & l) != 0L) { if (kind > 29) kind = 29; jjCheckNAdd(7); } else if (curChar == 33) { if (kind > 49) kind = 49; } else if (curChar == 38) jjstateSet[jjnewStateCnt++] = 15; else if (curChar == 60) jjstateSet[jjnewStateCnt++] = 13; else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 33) jjstateSet[jjnewStateCnt++] = 11; else if (curChar == 13) jjstateSet[jjnewStateCnt++] = 8; break; case 0: if (curChar != 35) break; if (kind > 16) kind = 16; jjCheckNAdd(1); break; case 1: if ((0xffffffffffffdbffL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(1); break; case 5: if (curChar == 10 && kind > 21) kind = 21; break; case 6: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 5; break; case 7: if ((0x100000200L & l) == 0L) break; if (kind > 29) kind = 29; jjCheckNAdd(7); break; case 8: if (curChar == 10 && kind > 30) kind = 30; break; case 9: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 8; break; case 10: if ((0x2400L & l) != 0L && kind > 30) kind = 30; break; case 11: if (curChar == 61 && kind > 42) kind = 42; break; case 12: if (curChar == 33) jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 62 && kind > 42) kind = 42; break; case 14: if (curChar == 60) jjstateSet[jjnewStateCnt++] = 13; break; case 15: if (curChar == 38 && kind > 47) kind = 47; break; case 16: if (curChar == 38) jjstateSet[jjnewStateCnt++] = 15; break; case 24: if (curChar == 33 && kind > 49) kind = 49; break; case 29: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 52) kind = 52; jjstateSet[jjnewStateCnt++] = 29; break; case 30: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 53) kind = 53; jjCheckNAdd(30); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 2: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 52) kind = 52; jjCheckNAdd(29); } else if (curChar == 124) jjstateSet[jjnewStateCnt++] = 20; else if (curChar == 92) jjAddStates(2, 3); if (curChar == 78) jjstateSet[jjnewStateCnt++] = 26; else if (curChar == 79) jjstateSet[jjnewStateCnt++] = 22; else if (curChar == 65) jjstateSet[jjnewStateCnt++] = 18; break; case 1: if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 1; break; case 3: if (curChar == 92) jjAddStates(2, 3); break; case 17: if (curChar == 68 && kind > 47) kind = 47; break; case 18: if (curChar == 78) jjstateSet[jjnewStateCnt++] = 17; break; case 19: if (curChar == 65) jjstateSet[jjnewStateCnt++] = 18; break; case 20: if (curChar == 124 && kind > 48) kind = 48; break; case 21: if (curChar == 124) jjstateSet[jjnewStateCnt++] = 20; break; case 22: if (curChar == 82 && kind > 48) kind = 48; break; case 23: if (curChar == 79) jjstateSet[jjnewStateCnt++] = 22; break; case 25: if (curChar == 84 && kind > 49) kind = 49; break; case 26: if (curChar == 79) jjstateSet[jjnewStateCnt++] = 25; break; case 27: if (curChar == 78) jjstateSet[jjnewStateCnt++] = 26; break; case 28: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(29); break; case 29: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(29); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 1: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 1; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 31 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,456
private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 10 && kind > 21) kind = 21; break; case 4: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffefffffffL & l) != 0L) { if (kind > 11) kind = 11; jjCheckNAdd(0); } else if (curChar == 92) jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xd7ffffffefffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 10 && kind > 21) kind = 21; break; case 4: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffefffffffL & l) != 0L) { if (kind > 11) kind = 11; jjCheckNAdd(0); } else if (curChar == 92) jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xd7ffffffefffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,457
private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 10 && kind > 21) kind = 21; break; case 4: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffefffffffL & l) != 0L) { if (kind > 11) kind = 11; jjCheckNAdd(0); } else if (curChar == 92) jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xd7ffffffefffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 10 && kind > 21) kind = 21; break; case 4: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffefffffffL & l) != 0L) { if (kind > 11) kind = 11; jjCheckNAdd(0); } else if (curChar == 92) jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xd7ffffffefffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,458
private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 10 && kind > 21) kind = 21; break; case 4: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffefffffffL & l) != 0L) { if (kind > 11) kind = 11; jjCheckNAdd(0); } else if (curChar == 92) jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xd7ffffffefffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 10 && kind > 21) kind = 21; break; case 4: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffefffffffL & l) != 0L) { if (kind > 11) kind = 11; jjCheckNAdd(0); } else if (curChar == 92) jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xd7ffffffefffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
1,122,459
private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x400000L) != 0L) return 4; if ((active0 & 0x804000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } if ((active0 & 0xc000000L) != 0L) return 29; return -1; case 4: if ((active0 & 0x10000000L) != 0L) return 29; return -1; default : return -1; }}
private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x400000L) != 0L) return 4; if ((active0 & 0x804000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } if ((active0 & 0xc000000L) != 0L) return 29; return -1; case 4: if ((active0 & 0x10000000L) != 0L) return 29; return -1; default : return -1; }}
1,122,460
private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x400000L) != 0L) return 4; if ((active0 & 0x804000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } if ((active0 & 0xc000000L) != 0L) return 29; return -1; case 4: if ((active0 & 0x10000000L) != 0L) return 29; return -1; default : return -1; }}
private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x400000L) != 0L) return 4; if ((active0 & 0x804000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } if ((active0 & 0xc000000L) != 0L) return 29; return -1; case 4: if ((active0 & 0x10000000L) != 0L) return 29; return -1; default : return -1; }}
1,122,461
private ThemeManager() { emoticonManager = EmoticonManager.getInstance(); BrowserEngineManager bem = BrowserEngineManager.instance(); //specific engine if you want and the engine you specified will return bem.setActiveEngine(BrowserEngineManager.MOZILLA); //IBrowserEngine be = bem.setActiveEngine(...); IBrowserEngine be = bem.getActiveEngine();//default or specified engine is returned // Note that the install directory is my name for temporary files and // not about mozilla. Me love Mozilla. be.setEnginePath("C:\\crapola\\mozilla\\mozilla.exe"); THEMES_DIRECTORY = new File(Spark.getBinDirectory().getParent(), "xtra/themes").getAbsoluteFile(); // For Testing THEMES_DIRECTORY = new File("c:\\xtra\\themes"); expandNewThemes(); final LocalPreferences pref = SettingsManager.getLocalPreferences(); String themeName = pref.getTheme(); File theme = new File(THEMES_DIRECTORY, themeName); try { setTheme(theme); } catch (Exception e) { e.printStackTrace(); } // Add Preference SparkManager.getPreferenceManager().addPreference(new ThemePreference()); }
private ThemeManager() { emoticonManager = EmoticonManager.getInstance(); BrowserEngineManager bem = BrowserEngineManager.instance(); //specific engine if you want and the engine you specified will return bem.setActiveEngine(BrowserEngineManager.MOZILLA); //IBrowserEngine be = bem.setActiveEngine(...); IBrowserEngine be = bem.getActiveEngine();//default or specified engine is returned // Note that the install directory is my name for temporary files and // not about mozilla. Me love Mozilla. be.setEnginePath("C:\\crapola\\mozilla\\mozilla.exe"); THEMES_DIRECTORY = new File(Spark.getBinDirectory().getParent(), "xtra/themes").getAbsoluteFile(); // For Testing expandNewThemes(); final LocalPreferences pref = SettingsManager.getLocalPreferences(); String themeName = pref.getTheme(); File theme = new File(THEMES_DIRECTORY, themeName); try { setTheme(theme); } catch (Exception e) { e.printStackTrace(); } // Add Preference SparkManager.getPreferenceManager().addPreference(new ThemePreference()); }
1,122,462
public synchronized void addContactItem(ContactItem item) { if (model.getSize() == 1 && model.getElementAt(0) == noContacts) { model.remove(0); } if ("Offline Group".equals(groupName)) { item.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); item.getNicknameLabel().setForeground(Color.GRAY); } item.setGroupName(getGroupName()); contactItems.add(item); Collections.sort(contactItems, itemComparator); int index = contactItems.indexOf(item); Object[] objs = list.getSelectedValues(); model.insertElementAt(item, index); int[] intList = new int[objs.length]; for (int i = 0; i < objs.length; i++) { ContactItem contact = (ContactItem)objs[i]; intList[i] = model.indexOf(contact); } if (intList.length > 0) { list.setSelectedIndices(intList); } fireContactItemAdded(item); }
public synchronized void addContactItem(ContactItem item) { if (model.getSize() == 1 && model.getElementAt(0) == noContacts) { model.remove(0); } if ("Offline Group".equals(groupName)) { item.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); item.getNicknameLabel().setForeground(Color.GRAY); } item.setGroupName(getGroupName()); contactItems.add(item); List<ContactItem> tempItems = getContactItems(); int index = contactItems.indexOf(item); Object[] objs = list.getSelectedValues(); model.insertElementAt(item, index); int[] intList = new int[objs.length]; for (int i = 0; i < objs.length; i++) { ContactItem contact = (ContactItem)objs[i]; intList[i] = model.indexOf(contact); } if (intList.length > 0) { list.setSelectedIndices(intList); } fireContactItemAdded(item); }
1,122,463
public synchronized void addContactItem(ContactItem item) { if (model.getSize() == 1 && model.getElementAt(0) == noContacts) { model.remove(0); } if ("Offline Group".equals(groupName)) { item.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); item.getNicknameLabel().setForeground(Color.GRAY); } item.setGroupName(getGroupName()); contactItems.add(item); Collections.sort(contactItems, itemComparator); int index = contactItems.indexOf(item); Object[] objs = list.getSelectedValues(); model.insertElementAt(item, index); int[] intList = new int[objs.length]; for (int i = 0; i < objs.length; i++) { ContactItem contact = (ContactItem)objs[i]; intList[i] = model.indexOf(contact); } if (intList.length > 0) { list.setSelectedIndices(intList); } fireContactItemAdded(item); }
public synchronized void addContactItem(ContactItem item) { if (model.getSize() == 1 && model.getElementAt(0) == noContacts) { model.remove(0); } if ("Offline Group".equals(groupName)) { item.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); item.getNicknameLabel().setForeground(Color.GRAY); } item.setGroupName(getGroupName()); contactItems.add(item); Collections.sort(contactItems, itemComparator); Collections.sort(tempItems, itemComparator); int index = tempItems.indexOf(item); Object[] objs = list.getSelectedValues(); model.insertElementAt(item, index); int[] intList = new int[objs.length]; for (int i = 0; i < objs.length; i++) { ContactItem contact = (ContactItem)objs[i]; intList[i] = model.indexOf(contact); } if (intList.length > 0) { list.setSelectedIndices(intList); } fireContactItemAdded(item); }
1,122,464
public Collection getStatusList() { return dndList; }
public Collection getStatusList() { return statusList; }
1,122,465
private void populateDndList() { final ImageIcon availableIcon = SparkRes.getImageIcon(SparkRes.GREEN_BALL); final ImageIcon awayIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); final ImageIcon dndIcon = SparkRes.getImageIcon(SparkRes.IM_DND); final ImageIcon phoneIcon = SparkRes.getImageIcon(SparkRes.ON_PHONE_IMAGE); StatusItem online = new StatusItem(new Presence(Presence.Type.available, "Online", -1, Presence.Mode.available), availableIcon); StatusItem freeToChat = new StatusItem(new Presence(Presence.Type.available, "Free To Chat", -1, Presence.Mode.chat), SparkRes.getImageIcon(SparkRes.FREE_TO_CHAT_IMAGE)); StatusItem away = new StatusItem(new Presence(Presence.Type.available, "Away", -1, Presence.Mode.away), awayIcon); StatusItem phone = new StatusItem(new Presence(Presence.Type.available, "On Phone", -1, Presence.Mode.away), phoneIcon); StatusItem dnd = new StatusItem(new Presence(Presence.Type.available, "Do Not Disturb", -1, Presence.Mode.dnd), dndIcon); StatusItem extendedAway = new StatusItem(new Presence(Presence.Type.available, "Extended Away", -1, Presence.Mode.xa), awayIcon); dndList.add(freeToChat); dndList.add(online); dndList.add(away); dndList.add(phone); dndList.add(extendedAway); dndList.add(dnd); // Set default presence icon (Avaialble) statusPanel.setIcon(availableIcon); }
private void populateDndList() { final ImageIcon availableIcon = SparkRes.getImageIcon(SparkRes.GREEN_BALL); final ImageIcon awayIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); final ImageIcon dndIcon = SparkRes.getImageIcon(SparkRes.IM_DND); final ImageIcon phoneIcon = SparkRes.getImageIcon(SparkRes.ON_PHONE_IMAGE); StatusItem online = new StatusItem(new Presence(Presence.Type.available, "Online", -1, Presence.Mode.available), availableIcon); StatusItem freeToChat = new StatusItem(new Presence(Presence.Type.available, "Free To Chat", -1, Presence.Mode.chat), SparkRes.getImageIcon(SparkRes.FREE_TO_CHAT_IMAGE)); StatusItem away = new StatusItem(new Presence(Presence.Type.available, "Away", -1, Presence.Mode.away), awayIcon); StatusItem phone = new StatusItem(new Presence(Presence.Type.available, "On Phone", -1, Presence.Mode.away), phoneIcon); StatusItem dnd = new StatusItem(new Presence(Presence.Type.available, "Do Not Disturb", -1, Presence.Mode.dnd), dndIcon); StatusItem extendedAway = new StatusItem(new Presence(Presence.Type.available, "Extended Away", -1, Presence.Mode.xa), awayIcon); dndList.add(freeToChat); dndList.add(online); dndList.add(away); dndList.add(phone); dndList.add(extendedAway); dndList.add(dnd); // Set default presence icon (Avaialble) statusPanel.setIcon(availableIcon); }
1,122,466
public void showPopup(MouseEvent e) { final JPopupMenu popup = new JPopupMenu(); List custom = CustomMessages.load(); if (custom == null) { custom = new ArrayList(); } // Build menu from dndList Iterator statusIterator = dndList.iterator(); while (statusIterator.hasNext()) { final StatusItem statusItem = (StatusItem)statusIterator.next(); final Action statusAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { final String text = statusItem.getText(); final StatusItem si = getStatusItem(text); if (si == null) { // Custom status return; } SwingWorker worker = new SwingWorker() { public Object construct() { SparkManager.getSessionManager().changePresence(si.getPresence()); return "ok"; } public void finished() { setStatus(text); } }; worker.start(); } }; statusAction.putValue(Action.NAME, statusItem.getText()); statusAction.putValue(Action.SMALL_ICON, statusItem.getIcon()); // Has Children boolean hasChildren = false; Iterator customItemIterator = custom.iterator(); while (customItemIterator.hasNext()) { final CustomStatusItem cItem = (CustomStatusItem)customItemIterator.next(); String type = cItem.getType(); if (type.equals(statusItem.getText())) { hasChildren = true; } } if (!hasChildren) { // Add as Menu Item popup.add(statusAction); } else { final JMenu mainStatusItem = new JMenu(statusAction); popup.add(mainStatusItem); // Add Custom Messages customItemIterator = custom.iterator(); while (customItemIterator.hasNext()) { final CustomStatusItem customItem = (CustomStatusItem)customItemIterator.next(); String type = customItem.getType(); if (type.equals(statusItem.getText())) { // Add Child Menu Action action = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { final String text = mainStatusItem.getText(); final StatusItem si = getStatusItem(text); if (si == null) { // Custom status return; } SwingWorker worker = new SwingWorker() { public Object construct() { Presence oldPresence = si.getPresence(); Presence presence = copyPresence(oldPresence); presence.setStatus(customItem.getStatus()); presence.setPriority(customItem.getPriority()); SparkManager.getSessionManager().changePresence(presence); return "ok"; } public void finished() { String status = customItem.getType() + " - " + customItem.getStatus(); setStatus(status); } }; worker.start(); } }; action.putValue(Action.NAME, customItem.getStatus()); action.putValue(Action.SMALL_ICON, statusItem.getIcon()); mainStatusItem.add(action); } } // If menu has children, allow it to still be clickable. mainStatusItem.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { statusAction.actionPerformed(null); popup.setVisible(false); } }); } } // Add change message final JMenuItem changeStatusMenu = new JMenuItem(Res.getString("menuitem.set.status.message"), SparkRes.getImageIcon(SparkRes.BLANK_IMAGE)); popup.addSeparator(); popup.add(changeStatusMenu); changeStatusMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { CustomMessages.addCustomMessage(); } }); Action editMessagesAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { CustomMessages.editCustomMessages(); } }; editMessagesAction.putValue(Action.NAME, Res.getString("menuitem.edit.status.message")); popup.add(editMessagesAction); popup.show(statusPanel, 0, statusPanel.getHeight()); }
public void showPopup(MouseEvent e) { final JPopupMenu popup = new JPopupMenu(); List custom = CustomMessages.load(); if (custom == null) { custom = new ArrayList(); } // Build menu from dndList Iterator statusIterator = dndList.iterator(); while (statusIterator.hasNext()) { final StatusItem statusItem = (StatusItem)statusIterator.next(); final Action statusAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { final String text = statusItem.getText(); final StatusItem si = getStatusItem(text); if (si == null) { // Custom status return; } SwingWorker worker = new SwingWorker() { public Object construct() { SparkManager.getSessionManager().changePresence(si.getPresence()); return "ok"; } public void finished() { setStatus(text); } }; worker.start(); } }; statusAction.putValue(Action.NAME, statusItem.getText()); statusAction.putValue(Action.SMALL_ICON, statusItem.getIcon()); // Has Children boolean hasChildren = false; Iterator customItemIterator = custom.iterator(); while (customItemIterator.hasNext()) { final CustomStatusItem cItem = (CustomStatusItem)customItemIterator.next(); String type = cItem.getType(); if (type.equals(statusItem.getText())) { hasChildren = true; } } if (!hasChildren) { // Add as Menu Item popup.add(statusAction); } else { final JMenu mainStatusItem = new JMenu(statusAction); popup.add(mainStatusItem); // Add Custom Messages customItemIterator = custom.iterator(); while (customItemIterator.hasNext()) { final CustomStatusItem customItem = (CustomStatusItem)customItemIterator.next(); String type = customItem.getType(); if (type.equals(statusItem.getText())) { // Add Child Menu Action action = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { final String text = mainStatusItem.getText(); final StatusItem si = getStatusItem(text); if (si == null) { // Custom status return; } SwingWorker worker = new SwingWorker() { public Object construct() { Presence oldPresence = si.getPresence(); Presence presence = copyPresence(oldPresence); presence.setStatus(customItem.getStatus()); presence.setPriority(customItem.getPriority()); SparkManager.getSessionManager().changePresence(presence); return "ok"; } public void finished() { String status = customItem.getType() + " - " + customItem.getStatus(); setStatus(status); } }; worker.start(); } }; action.putValue(Action.NAME, customItem.getStatus()); action.putValue(Action.SMALL_ICON, statusItem.getIcon()); mainStatusItem.add(action); } } // If menu has children, allow it to still be clickable. mainStatusItem.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { statusAction.actionPerformed(null); popup.setVisible(false); } }); } } // Add change message final JMenuItem changeStatusMenu = new JMenuItem(Res.getString("menuitem.set.status.message"), SparkRes.getImageIcon(SparkRes.BLANK_IMAGE)); popup.addSeparator(); popup.add(changeStatusMenu); changeStatusMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { CustomMessages.addCustomMessage(); } }); Action editMessagesAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { CustomMessages.editCustomMessages(); } }; editMessagesAction.putValue(Action.NAME, Res.getString("menuitem.edit.status.message")); popup.add(editMessagesAction); popup.show(statusPanel, 0, statusPanel.getHeight()); }
1,122,467
public void messageReceived(final ChatRoom room, final Message message) { if (!SparkManager.getMainWindow().isFocused()) { SwingUtilities.invokeLater(new Runnable() { public void run() { try { String name = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom()); // Since it looks the method can return null do this in case if (name == null) { name = StringUtils.parseName(message.getFrom()); } VCard vCard = null; try { vCard = SparkManager.getVCardManager().getVCard( StringUtils.parseBareAddress(message.getFrom())); } catch (Exception e) { // vcard can time out so ignore } NSImage image = null; if (vCard != null) { byte[] bytes = vCard.getAvatar(); if (bytes != null) { try { NSData data = new NSData(bytes); image = new NSImage(data); } catch (Exception e) { // just incase there is an error i didn't intend } } } if (image == null) { image = getImage("/images/message-32x32.png"); } growl.notifyGrowlOf("Message Received", image, name, message.getBody(), null); } catch (Exception e) { Logger.logError(e.getMessage(), e); } } }); } }
public void messageReceived(final ChatRoom room, final Message message) { if (!SparkManager.getMainWindow().isFocused()) { SwingUtilities.invokeLater(new Runnable() { public void run() { try { String name = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom()); // Since it looks the method can return null do this in case if (name == null) { name = StringUtils.parseName(message.getFrom()); } VCard vCard = null; try { vCard = SparkManager.getVCardManager().getVCard( StringUtils.parseBareAddress(message.getFrom())); } catch (Exception e) { // vcard can time out so ignore } NSImage image = null; if (vCard != null) { byte[] bytes = vCard.getAvatar(); if (bytes != null) { try { NSData data = new NSData(bytes); image = new NSImage(data); } catch (Exception e) { // just incase there is an error i didn't intend } } } if (image == null) { image = getImage("/images/message-32x32.png"); } growl.notifyGrowlOf("Message Received", image, name, message.getBody(), null); } catch (Exception e) { Log.error(e.getMessage(), e); } } }); } }
1,122,469
public void run() { try { String name = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom()); // Since it looks the method can return null do this in case if (name == null) { name = StringUtils.parseName(message.getFrom()); } VCard vCard = null; try { vCard = SparkManager.getVCardManager().getVCard( StringUtils.parseBareAddress(message.getFrom())); } catch (Exception e) { // vcard can time out so ignore } NSImage image = null; if (vCard != null) { byte[] bytes = vCard.getAvatar(); if (bytes != null) { try { NSData data = new NSData(bytes); image = new NSImage(data); } catch (Exception e) { // just incase there is an error i didn't intend } } } if (image == null) { image = getImage("/images/message-32x32.png"); } growl.notifyGrowlOf("Message Received", image, name, message.getBody(), null); } catch (Exception e) { Logger.logError(e.getMessage(), e); } }
public void run() { try { String name = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom()); // Since it looks the method can return null do this in case if (name == null) { name = StringUtils.parseName(message.getFrom()); } VCard vCard = null; try { vCard = SparkManager.getVCardManager().getVCard( StringUtils.parseBareAddress(message.getFrom())); } catch (Exception e) { // vcard can time out so ignore } NSImage image = null; if (vCard != null) { byte[] bytes = vCard.getAvatar(); if (bytes != null) { try { NSData data = new NSData(bytes); image = new NSImage(data); } catch (Exception e) { // just incase there is an error i didn't intend } } } if (image == null) { image = getImage("/images/message-32x32.png"); } growl.notifyGrowlOf("Message Received", image, name, message.getBody(), null); } catch (Exception e) { Log.error(e.getMessage(), e); } }
1,122,470
public DisplayedDocument(Shell shell) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document document = new Document(); Note root = new Note("root", document, ""); LinkedList<Note> roots = new LinkedList<Note>(); roots.add(root); // Listener, Dispatcher, Controllers Dispatcher dispatcher = new Dispatcher(this); listener = new Listener(dispatcher); // Menu mainMenu = new MainMenu(shell, listener); // SashForm SashForm sashForm = new SashForm(shell, SWT.HORIZONTAL); // Tree tree = new NoteTree(sashForm, listener); tree.loadTree(roots); tree.init(); // TabFolder tabFolder = new NoteTabFolder(sashForm, listener); sashForm.setWeights(new int[] {20, 80}); }
public DisplayedDocument(Shell shell) { // Shell this.shell = shell; shell.setText("Koala Notes"); shell.setLayout(new FillLayout(SWT.VERTICAL)); // Document document = new Document(); Note root = new Note("root", document, ""); LinkedList<Note> roots = new LinkedList<Note>(); roots.add(root); // Listener, Dispatcher, Controllers Dispatcher dispatcher = new Dispatcher(this); listener = new Listener(dispatcher); // Menu mainMenu = new MainMenu(shell, listener); // SashForm SashForm sashForm = new SashForm(shell, SWT.HORIZONTAL); // Tree tree = new NoteTree(sashForm, listener); tree.loadTree(roots); tree.init(); // TabFolder tabFolder = new NoteTabFolder(sashForm, listener); sashForm.setWeights(new int[] {20, 80}); }
1,122,471
public Listener(Controllers controllers) { this.controllers = controllers; srcToEvtToMethod = new HashMap<Widget, HashMap<Integer, String>>(); }
public Listener(Controllers controllers) { this.controllers = controllers; srcToEvtToMethod = new HashMap<Widget, HashMap<Integer, String>>(); }
1,122,473
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem("Add Contact", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); addContactGroupMenu = new JMenuItem("Add Contact Group", SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); removeContactFromGroupMenu = new JMenuItem("Remove from Group", SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); chatMenu = new JMenuItem("Start a Chat", SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE)); renameMenu = new JMenuItem("Rename", SparkRes.getImageIcon(SparkRes.DESKTOP_IMAGE)); addContactMenu.addActionListener(this); removeContactFromGroupMenu.addActionListener(this); chatMenu.addActionListener(this); renameMenu.addActionListener(this); setLayout(new CardLayout()); addingGroupButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.ADD_CONTACT_IMAGE)); RolloverButton groupChatButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.JOIN_GROUPCHAT_IMAGE)); toolbar.add(addingGroupButton); toolbar.add(groupChatButton); addingGroupButton.addActionListener(this); mainPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false)); mainPanel.setBackground((Color)UIManager.get("List.background")); treeScroller = new JScrollPane(mainPanel); treeScroller.setBorder(BorderFactory.createEmptyBorder()); treeScroller.getVerticalScrollBar().setBlockIncrement(50); treeScroller.getVerticalScrollBar().setUnitIncrement(20); add(treeScroller, ROSTER_PANEL); retryPanel = new RetryPanel(); add(retryPanel, RETRY_PANEL); // Load Properties file props = new Properties(); // Save to properties file. propertiesFile = new File(new File(Spark.getUserHome(), "Spark"), "groups.properties"); try { props.load(new FileInputStream(propertiesFile)); } catch (IOException e) { // File does not exist. } // Add ActionListener(s) to menus addContactGroup(offlineGroup); showHideMenu.setSelected(false); // Add KeyMappings getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control N"), "searchContacts"); getActionMap().put("searchContacts", new AbstractAction("searchContacts") { public void actionPerformed(ActionEvent evt) { searchContacts(""); } }); // Save state on shutdown. SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { saveState(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(this); // Get command panel and add View Online/Offline, Add Contact StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); JPanel commandPanel = statusBar.getCommandPanel(); viewOnline = new RolloverButton(SparkRes.getImageIcon(SparkRes.VIEW_IMAGE)); commandPanel.add(viewOnline); viewOnline.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(!showHideMenu.isSelected()); } }); final RolloverButton addContactButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); commandPanel.add(addContactButton); addContactButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); }
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem("Add Contact", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); addContactGroupMenu = new JMenuItem("Add Contact Group", SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); removeContactFromGroupMenu = new JMenuItem("Remove from Group", SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); chatMenu = new JMenuItem("Start a Chat", SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE)); renameMenu = new JMenuItem("Rename", SparkRes.getImageIcon(SparkRes.DESKTOP_IMAGE)); addContactMenu.addActionListener(this); removeContactFromGroupMenu.addActionListener(this); chatMenu.addActionListener(this); renameMenu.addActionListener(this); setLayout(new BorderLayout()); addingGroupButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.ADD_CONTACT_IMAGE)); RolloverButton groupChatButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.JOIN_GROUPCHAT_IMAGE)); toolbar.add(addingGroupButton); toolbar.add(groupChatButton); addingGroupButton.addActionListener(this); mainPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false)); mainPanel.setBackground((Color)UIManager.get("List.background")); treeScroller = new JScrollPane(mainPanel); treeScroller.setBorder(BorderFactory.createEmptyBorder()); treeScroller.getVerticalScrollBar().setBlockIncrement(50); treeScroller.getVerticalScrollBar().setUnitIncrement(20); add(treeScroller, ROSTER_PANEL); retryPanel = new RetryPanel(); add(retryPanel, RETRY_PANEL); // Load Properties file props = new Properties(); // Save to properties file. propertiesFile = new File(new File(Spark.getUserHome(), "Spark"), "groups.properties"); try { props.load(new FileInputStream(propertiesFile)); } catch (IOException e) { // File does not exist. } // Add ActionListener(s) to menus addContactGroup(offlineGroup); showHideMenu.setSelected(false); // Add KeyMappings getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control N"), "searchContacts"); getActionMap().put("searchContacts", new AbstractAction("searchContacts") { public void actionPerformed(ActionEvent evt) { searchContacts(""); } }); // Save state on shutdown. SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { saveState(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(this); // Get command panel and add View Online/Offline, Add Contact StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); JPanel commandPanel = statusBar.getCommandPanel(); viewOnline = new RolloverButton(SparkRes.getImageIcon(SparkRes.VIEW_IMAGE)); commandPanel.add(viewOnline); viewOnline.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(!showHideMenu.isSelected()); } }); final RolloverButton addContactButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); commandPanel.add(addContactButton); addContactButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); }
1,122,475
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem("Add Contact", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); addContactGroupMenu = new JMenuItem("Add Contact Group", SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); removeContactFromGroupMenu = new JMenuItem("Remove from Group", SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); chatMenu = new JMenuItem("Start a Chat", SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE)); renameMenu = new JMenuItem("Rename", SparkRes.getImageIcon(SparkRes.DESKTOP_IMAGE)); addContactMenu.addActionListener(this); removeContactFromGroupMenu.addActionListener(this); chatMenu.addActionListener(this); renameMenu.addActionListener(this); setLayout(new CardLayout()); addingGroupButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.ADD_CONTACT_IMAGE)); RolloverButton groupChatButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.JOIN_GROUPCHAT_IMAGE)); toolbar.add(addingGroupButton); toolbar.add(groupChatButton); addingGroupButton.addActionListener(this); mainPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false)); mainPanel.setBackground((Color)UIManager.get("List.background")); treeScroller = new JScrollPane(mainPanel); treeScroller.setBorder(BorderFactory.createEmptyBorder()); treeScroller.getVerticalScrollBar().setBlockIncrement(50); treeScroller.getVerticalScrollBar().setUnitIncrement(20); add(treeScroller, ROSTER_PANEL); retryPanel = new RetryPanel(); add(retryPanel, RETRY_PANEL); // Load Properties file props = new Properties(); // Save to properties file. propertiesFile = new File(new File(Spark.getUserHome(), "Spark"), "groups.properties"); try { props.load(new FileInputStream(propertiesFile)); } catch (IOException e) { // File does not exist. } // Add ActionListener(s) to menus addContactGroup(offlineGroup); showHideMenu.setSelected(false); // Add KeyMappings getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control N"), "searchContacts"); getActionMap().put("searchContacts", new AbstractAction("searchContacts") { public void actionPerformed(ActionEvent evt) { searchContacts(""); } }); // Save state on shutdown. SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { saveState(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(this); // Get command panel and add View Online/Offline, Add Contact StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); JPanel commandPanel = statusBar.getCommandPanel(); viewOnline = new RolloverButton(SparkRes.getImageIcon(SparkRes.VIEW_IMAGE)); commandPanel.add(viewOnline); viewOnline.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(!showHideMenu.isSelected()); } }); final RolloverButton addContactButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); commandPanel.add(addContactButton); addContactButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); }
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem("Add Contact", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); addContactGroupMenu = new JMenuItem("Add Contact Group", SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); removeContactFromGroupMenu = new JMenuItem("Remove from Group", SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); chatMenu = new JMenuItem("Start a Chat", SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE)); renameMenu = new JMenuItem("Rename", SparkRes.getImageIcon(SparkRes.DESKTOP_IMAGE)); addContactMenu.addActionListener(this); removeContactFromGroupMenu.addActionListener(this); chatMenu.addActionListener(this); renameMenu.addActionListener(this); setLayout(new CardLayout()); addingGroupButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.ADD_CONTACT_IMAGE)); RolloverButton groupChatButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.JOIN_GROUPCHAT_IMAGE)); toolbar.add(addingGroupButton); toolbar.add(groupChatButton); addingGroupButton.addActionListener(this); mainPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false)); mainPanel.setBackground((Color)UIManager.get("List.background")); treeScroller = new JScrollPane(mainPanel); treeScroller.setBorder(BorderFactory.createEmptyBorder()); treeScroller.getVerticalScrollBar().setBlockIncrement(50); treeScroller.getVerticalScrollBar().setUnitIncrement(20); retryPanel = new RetryPanel(); retryPanel = new RetryPanel(); add(retryPanel, RETRY_PANEL); // Load Properties file props = new Properties(); // Save to properties file. propertiesFile = new File(new File(Spark.getUserHome(), "Spark"), "groups.properties"); try { props.load(new FileInputStream(propertiesFile)); } catch (IOException e) { // File does not exist. } // Add ActionListener(s) to menus addContactGroup(offlineGroup); showHideMenu.setSelected(false); // Add KeyMappings getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control N"), "searchContacts"); getActionMap().put("searchContacts", new AbstractAction("searchContacts") { public void actionPerformed(ActionEvent evt) { searchContacts(""); } }); // Save state on shutdown. SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { saveState(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(this); // Get command panel and add View Online/Offline, Add Contact StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); JPanel commandPanel = statusBar.getCommandPanel(); viewOnline = new RolloverButton(SparkRes.getImageIcon(SparkRes.VIEW_IMAGE)); commandPanel.add(viewOnline); viewOnline.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(!showHideMenu.isSelected()); } }); final RolloverButton addContactButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); commandPanel.add(addContactButton); addContactButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); }
1,122,476
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem("Add Contact", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); addContactGroupMenu = new JMenuItem("Add Contact Group", SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); removeContactFromGroupMenu = new JMenuItem("Remove from Group", SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); chatMenu = new JMenuItem("Start a Chat", SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE)); renameMenu = new JMenuItem("Rename", SparkRes.getImageIcon(SparkRes.DESKTOP_IMAGE)); addContactMenu.addActionListener(this); removeContactFromGroupMenu.addActionListener(this); chatMenu.addActionListener(this); renameMenu.addActionListener(this); setLayout(new CardLayout()); addingGroupButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.ADD_CONTACT_IMAGE)); RolloverButton groupChatButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.JOIN_GROUPCHAT_IMAGE)); toolbar.add(addingGroupButton); toolbar.add(groupChatButton); addingGroupButton.addActionListener(this); mainPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false)); mainPanel.setBackground((Color)UIManager.get("List.background")); treeScroller = new JScrollPane(mainPanel); treeScroller.setBorder(BorderFactory.createEmptyBorder()); treeScroller.getVerticalScrollBar().setBlockIncrement(50); treeScroller.getVerticalScrollBar().setUnitIncrement(20); add(treeScroller, ROSTER_PANEL); retryPanel = new RetryPanel(); add(retryPanel, RETRY_PANEL); // Load Properties file props = new Properties(); // Save to properties file. propertiesFile = new File(new File(Spark.getUserHome(), "Spark"), "groups.properties"); try { props.load(new FileInputStream(propertiesFile)); } catch (IOException e) { // File does not exist. } // Add ActionListener(s) to menus addContactGroup(offlineGroup); showHideMenu.setSelected(false); // Add KeyMappings getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control N"), "searchContacts"); getActionMap().put("searchContacts", new AbstractAction("searchContacts") { public void actionPerformed(ActionEvent evt) { searchContacts(""); } }); // Save state on shutdown. SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { saveState(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(this); // Get command panel and add View Online/Offline, Add Contact StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); JPanel commandPanel = statusBar.getCommandPanel(); viewOnline = new RolloverButton(SparkRes.getImageIcon(SparkRes.VIEW_IMAGE)); commandPanel.add(viewOnline); viewOnline.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(!showHideMenu.isSelected()); } }); final RolloverButton addContactButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); commandPanel.add(addContactButton); addContactButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); }
public ContactList() { // Load Local Preferences localPreferences = SettingsManager.getLocalPreferences(); offlineGroup = new ContactGroup("Offline Group"); JToolBar toolbar = new JToolBar(); toolbar.setFloatable(false); addContactMenu = new JMenuItem("Add Contact", SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16)); addContactGroupMenu = new JMenuItem("Add Contact Group", SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); removeContactFromGroupMenu = new JMenuItem("Remove from Group", SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); chatMenu = new JMenuItem("Start a Chat", SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE)); renameMenu = new JMenuItem("Rename", SparkRes.getImageIcon(SparkRes.DESKTOP_IMAGE)); addContactMenu.addActionListener(this); removeContactFromGroupMenu.addActionListener(this); chatMenu.addActionListener(this); renameMenu.addActionListener(this); setLayout(new CardLayout()); addingGroupButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.ADD_CONTACT_IMAGE)); RolloverButton groupChatButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.JOIN_GROUPCHAT_IMAGE)); toolbar.add(addingGroupButton); toolbar.add(groupChatButton); addingGroupButton.addActionListener(this); mainPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false)); mainPanel.setBackground((Color)UIManager.get("List.background")); treeScroller = new JScrollPane(mainPanel); treeScroller.setBorder(BorderFactory.createEmptyBorder()); treeScroller.getVerticalScrollBar().setBlockIncrement(50); treeScroller.getVerticalScrollBar().setUnitIncrement(20); add(treeScroller, ROSTER_PANEL); retryPanel = new RetryPanel(); add(retryPanel, RETRY_PANEL); // Load Properties file props = new Properties(); // Save to properties file. propertiesFile = new File(new File(Spark.getUserHome(), "Spark"), "groups.properties"); try { props.load(new FileInputStream(propertiesFile)); } catch (IOException e) { // File does not exist. } // Add ActionListener(s) to menus addContactGroup(offlineGroup); showHideMenu.setSelected(false); // Add KeyMappings getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control N"), "searchContacts"); getActionMap().put("searchContacts", new AbstractAction("searchContacts") { public void actionPerformed(ActionEvent evt) { searchContacts(""); } }); // Save state on shutdown. SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() { public void shutdown() { saveState(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); SparkManager.getConnection().addConnectionListener(this); // Get command panel and add View Online/Offline, Add Contact StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); JPanel commandPanel = statusBar.getCommandPanel(); viewOnline = new RolloverButton(SparkRes.getImageIcon(SparkRes.VIEW_IMAGE)); commandPanel.add(viewOnline); viewOnline.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showEmptyGroups(!showHideMenu.isSelected()); } }); final RolloverButton addContactButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE)); commandPanel.add(addContactButton); addContactButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new RosterDialog().showRosterDialog(); } }); }
1,122,477
public void clientReconnected() { XMPPConnection con = SparkManager.getConnection(); if (con.isConnected()) { // Send Available status final Presence presence = SparkManager.getWorkspace().getStatusBar().getPresence(); SparkManager.getSessionManager().changePresence(presence); final Roster roster = con.getRoster(); final Iterator rosterEntries = roster.getEntries(); while (rosterEntries.hasNext()) { RosterEntry entry = (RosterEntry)rosterEntries.next(); updateUserPresence(roster.getPresence(entry.getUser())); } } CardLayout cl = (CardLayout)getLayout(); cl.show(this, ROSTER_PANEL); }
public void clientReconnected() { XMPPConnection con = SparkManager.getConnection(); if (con.isConnected()) { // Send Available status final Presence presence = SparkManager.getWorkspace().getStatusBar().getPresence(); SparkManager.getSessionManager().changePresence(presence); final Roster roster = con.getRoster(); final Iterator rosterEntries = roster.getEntries(); while (rosterEntries.hasNext()) { RosterEntry entry = (RosterEntry)rosterEntries.next(); updateUserPresence(roster.getPresence(entry.getUser())); } } CardLayout cl = (CardLayout)getLayout(); cl.show(this, ROSTER_PANEL); }
1,122,478
private void reconnect(final String message, final boolean conflict) { // Show MainWindow SparkManager.getMainWindow().setVisible(true); // Flash That Window. SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow()); if (reconnectListener == null) { reconnectListener = new RetryPanel.ReconnectListener() { public void reconnected() { clientReconnected(); } public void cancelled() { removeAllUsers(); } }; retryPanel.addReconnectionListener(reconnectListener); } // Show reconnect panel CardLayout cl = (CardLayout)getLayout(); cl.show(this, RETRY_PANEL); retryPanel.setDisconnectReason(message); if (!conflict) { retryPanel.startTimer(); } else { retryPanel.showConflict(); } }
private void reconnect(final String message, final boolean conflict) { // Show MainWindow SparkManager.getMainWindow().setVisible(true); // Flash That Window. SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow()); if (reconnectListener == null) { reconnectListener = new RetryPanel.ReconnectListener() { public void reconnected() { clientReconnected(); } public void cancelled() { removeAllUsers(); } }; retryPanel.addReconnectionListener(reconnectListener); } // Show reconnect panel CardLayout cl = (CardLayout)getLayout(); cl.show(this, RETRY_PANEL); retryPanel.setDisconnectReason(message); if (!conflict) { retryPanel.startTimer(); } else { retryPanel.showConflict(); } }
1,122,479
private void removeAllUsers() { // Show reconnect panel CardLayout cardLayout = (CardLayout)getLayout(); cardLayout.show(this, ROSTER_PANEL); // Behind the scenes, move everyone to the offline group. Iterator contactGroups = new ArrayList(getContactGroups()).iterator(); while (contactGroups.hasNext()) { ContactGroup contactGroup = (ContactGroup)contactGroups.next(); Iterator contactItems = new ArrayList(contactGroup.getContactItems()).iterator(); while (contactItems.hasNext()) { ContactItem item = (ContactItem)contactItems.next(); contactGroup.removeContactItem(item); } } }
private void removeAllUsers() { // Show reconnect panel CardLayout cardLayout = (CardLayout)getLayout(); cardLayout.show(this, ROSTER_PANEL); // Behind the scenes, move everyone to the offline group. Iterator contactGroups = new ArrayList(getContactGroups()).iterator(); while (contactGroups.hasNext()) { ContactGroup contactGroup = (ContactGroup)contactGroups.next(); Iterator contactItems = new ArrayList(contactGroup.getContactItems()).iterator(); while (contactItems.hasNext()) { ContactItem item = (ContactItem)contactItems.next(); contactGroup.removeContactItem(item); } } }
1,122,480
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.black); titleLabel.setFont(new Font("dialog", Font.BOLD, 11)); descriptionLabel.setFont(new Font("dialog", 0, 10)); } else { final JPanel panel = new ImagePanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0)); titleLabel.setVerticalTextPosition(JLabel.CENTER); titleLabel.setFont(new Font("dialog", Font.BOLD, 14)); titleLabel.setForeground(Color.black); descriptionLabel.setFont(new Font("dialog", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 2, 2, 2), 0, 0)); } }
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("dialog", Font.BOLD, 11)); descriptionLabel.setFont(new Font("dialog", 0, 10)); } else { final JPanel panel = new ImagePanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0)); titleLabel.setVerticalTextPosition(JLabel.CENTER); titleLabel.setFont(new Font("dialog", Font.BOLD, 14)); titleLabel.setForeground(Color.black); descriptionLabel.setFont(new Font("dialog", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 2, 2, 2), 0, 0)); } }
1,122,482
public ObjectName load(Kernel kernel, String location) { try { LiveHashSet repositories = new LiveHashSet(kernel, "repositories", Collections.singleton(new ObjectName("*:j2eeType=Repository,*"))); repositories.start(); ConfigurationInfo configurationInfo = loadConfigurationInfo(location); final ClassLoader classLoader = ConfigurationUtil.createClassLoader(configurationInfo.getConfigurationId(), configurationInfo.getDependencies(), getClass().getClassLoader(), repositories); DefaultListableBeanFactory factory = new DefaultListableBeanFactory(); try { Resource resource = new FileSystemResource(new File(location)); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory) { public ClassLoader getBeanClassLoader() { return classLoader; } }; reader.loadBeanDefinitions(resource); } catch (BeansException e) { // not a spring file return null; } // convert properties into named constructor args List metadataProviders = new ArrayList(2); metadataProviders.add(new GeronimoMetadataProvider()); metadataProviders.add(new PropertiesMetadataProvider()); MetadataManager metadataManager = new SimpleMetadataManager(metadataProviders); NamedConstructorArgs namedConstructorArgs = new NamedConstructorArgs(metadataManager); namedConstructorArgs.postProcessBeanFactory(factory); // create object names for all of the beans ObjectNameBuilder objectNameBuilder = new ObjectNameBuilder(metadataManager, configurationInfo.getDomain(), configurationInfo.getServer(), configurationInfo.getConfigurationId().toString()); objectNameBuilder.postProcessBeanFactory(factory); // auto detect the livecycle methods (todo this needs work) LifecycleDetector lifecycleDetector = new LifecycleDetector(); lifecycleDetector.addLifecycleInterface(SimpleLifecycle.class, "start", "stop"); lifecycleDetector.addLifecycleInterface(org.apache.geronimo.gbean.GBeanLifecycle.class, "doStart", "doStop"); lifecycleDetector.postProcessBeanFactory(factory); Map serviceFactories = new LinkedHashMap(); String[] beanDefinitionNames = factory.getBeanDefinitionNames(); if (beanDefinitionNames != null) { for (int i = 0; i < beanDefinitionNames.length; i++) { String beanName = beanDefinitionNames[i]; BeanDefinition beanDefinition = factory.getBeanDefinition(beanName); ServiceFactory serviceFactory = new SpringServiceFactory((RootBeanDefinition) beanDefinition, objectNameBuilder.getObjectNameMap()); ObjectName objectName = objectNameBuilder.getObjectName(beanName); serviceFactories.put(objectName, serviceFactory); } } SpringConfiguration springConfiguration = new SpringConfiguration(kernel, configurationInfo, serviceFactories, classLoader); SimpleServiceFactory springServiceFactory = new SimpleServiceFactory(springConfiguration); ObjectName configurationObjectName = springConfiguration.getObjectName(); kernel.loadService(configurationObjectName, springServiceFactory, classLoader); return configurationObjectName; } catch (Exception e) { throw new InvalidConfigurationException("Unable to load configuration: " + location, e); } }
public ObjectName load(Kernel kernel, String location) { try { LiveHashSet repositories = new LiveHashSet(kernel, "repositories", Collections.singleton(new ObjectName("*:j2eeType=Repository,*"))); repositories.start(); ConfigurationInfo configurationInfo = loadConfigurationInfo(location); final ClassLoader classLoader = ConfigurationUtil.createClassLoader(configurationInfo.getConfigurationId(), configurationInfo.getDependencies(), getClass().getClassLoader(), repositories); DefaultListableBeanFactory factory = new DefaultListableBeanFactory(); try { Resource resource = new FileSystemResource(new File(location)); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory) { public ClassLoader getBeanClassLoader() { return classLoader; } }; reader.loadBeanDefinitions(resource); } catch (BeansException e) { // not a spring file return null; } // convert properties into named constructor args List metadataProviders = new ArrayList(2); metadataProviders.add(new GeronimoMetadataProvider()); metadataProviders.add(new PropertiesMetadataProvider()); MetadataManager metadataManager = new SimpleMetadataManager(metadataProviders); NamedConstructorArgs namedConstructorArgs = new NamedConstructorArgs(metadataManager); namedConstructorArgs.postProcessBeanFactory(factory); // create object names for all of the beans ObjectNameBuilder objectNameBuilder = new ObjectNameBuilder(metadataManager, configurationInfo.getDomain(), configurationInfo.getServer(), configurationInfo.getConfigurationId().toString()); objectNameBuilder.postProcessBeanFactory(factory); // auto detect the livecycle methods (todo this needs work) LifecycleDetector lifecycleDetector = new LifecycleDetector(); lifecycleDetector.addLifecycleInterface(SimpleLifecycle.class, "start", "stop"); lifecycleDetector.addLifecycleInterface(org.apache.geronimo.gbean.GBeanLifecycle.class, "doStart", "doStop"); lifecycleDetector.postProcessBeanFactory(factory); Map serviceFactories = new LinkedHashMap(); String[] beanDefinitionNames = factory.getBeanDefinitionNames(); if (beanDefinitionNames != null) { for (int i = 0; i < beanDefinitionNames.length; i++) { String beanName = beanDefinitionNames[i]; BeanDefinition beanDefinition = factory.getBeanDefinition(beanName); ServiceFactory serviceFactory = new SpringServiceFactory((RootBeanDefinition) beanDefinition, objectNameBuilder.getObjectNameMap()); ObjectName objectName = objectNameBuilder.getObjectName(beanName); serviceFactories.put(objectName, serviceFactory); } } SpringConfiguration springConfiguration = new SpringConfiguration(kernel, configurationInfo, serviceFactories, classLoader); SimpleServiceFactory springServiceFactory = new SimpleServiceFactory(springConfiguration); ObjectName configurationObjectName = springConfiguration.getObjectName(); kernel.loadService(configurationObjectName, springServiceFactory, classLoader); return configurationObjectName; } catch (Exception e) { throw new InvalidConfigurationException("Unable to load configuration: " + location, e); } }
1,122,483
public InvalidConfigurationException(String s, Throwable throwable) { super(s, throwable); }
public InvalidConfigurationException(String s, Throwable throwable) { super(s, throwable); }
1,122,485
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); parametersToConstructorArgs(rootBeanDefinition); } }; visitor.visitBeanFactory(beanFactory); }
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); parametersToConstructorArgs(rootBeanDefinition); } }; visitor.visitBeanFactory(beanFactory); }
1,122,486
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); parametersToConstructorArgs(rootBeanDefinition); } }; visitor.visitBeanFactory(beanFactory); }
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); processParameters(rootBeanDefinition); } }; visitor.visitBeanFactory(beanFactory); }
1,122,487
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); parametersToConstructorArgs(rootBeanDefinition); } }; visitor.visitBeanFactory(beanFactory); }
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); parametersToConstructorArgs(rootBeanDefinition); } }; visitor.visitBeanFactory(beanFactory, null); }
1,122,488
public ObjectNameBuilder(MetadataManager metadataManager, String domainName, String serverName, String applicationName) { this.metadataManager = metadataManager; this.domainName = domainName; this.serverName = serverName; this.applicationName = applicationName; }
public ObjectNameBuilder(MetadataManager metadataManager, String domainName, String serverName, String moduleName) { this.metadataManager = metadataManager; this.domainName = domainName; this.serverName = serverName; this.applicationName = applicationName; }
1,122,489
public ObjectNameBuilder(MetadataManager metadataManager, String domainName, String serverName, String applicationName) { this.metadataManager = metadataManager; this.domainName = domainName; this.serverName = serverName; this.applicationName = applicationName; }
public ObjectNameBuilder(MetadataManager metadataManager, String domainName, String serverName, String applicationName) { this.metadataManager = metadataManager; this.domainName = domainName; this.serverName = serverName; this.moduleName = moduleName; }
1,122,490
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); Class beanType = rootBeanDefinition.getBeanClass(); for (Iterator iterator = lifecycleMap.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); Class lifecycleInterface = (Class) entry.getKey(); LifecycleMethods value = (LifecycleMethods) entry.getValue(); if (lifecycleInterface.isAssignableFrom(beanType)) { if (rootBeanDefinition.getInitMethodName() == null) { rootBeanDefinition.setInitMethodName(value.initMethodName); } if (rootBeanDefinition.getDestroyMethodName() == null) { rootBeanDefinition.setDestroyMethodName(value.destroyMethodName); } if (rootBeanDefinition.getInitMethodName() != null && rootBeanDefinition.getDestroyMethodName() != null) { return; } } } } }; visitor.visitBeanFactory(beanFactory); }
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); Class beanType = rootBeanDefinition.getBeanClass(); for (Iterator iterator = lifecycleMap.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); Class lifecycleInterface = (Class) entry.getKey(); LifecycleMethods value = (LifecycleMethods) entry.getValue(); if (lifecycleInterface.isAssignableFrom(beanType)) { if (rootBeanDefinition.getInitMethodName() == null) { rootBeanDefinition.setInitMethodName(value.initMethodName); } if (rootBeanDefinition.getDestroyMethodName() == null) { rootBeanDefinition.setDestroyMethodName(value.destroyMethodName); } if (rootBeanDefinition.getInitMethodName() != null && rootBeanDefinition.getDestroyMethodName() != null) { return; } } } } }; visitor.visitBeanFactory(beanFactory); }
1,122,491
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); Class beanType = rootBeanDefinition.getBeanClass(); for (Iterator iterator = lifecycleMap.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); Class lifecycleInterface = (Class) entry.getKey(); LifecycleMethods value = (LifecycleMethods) entry.getValue(); if (lifecycleInterface.isAssignableFrom(beanType)) { if (rootBeanDefinition.getInitMethodName() == null) { rootBeanDefinition.setInitMethodName(value.initMethodName); } if (rootBeanDefinition.getDestroyMethodName() == null) { rootBeanDefinition.setDestroyMethodName(value.destroyMethodName); } if (rootBeanDefinition.getInitMethodName() != null && rootBeanDefinition.getDestroyMethodName() != null) { return; } } } } }; visitor.visitBeanFactory(beanFactory); }
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { SpringVisitor visitor = new AbstractSpringVisitor() { public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); Class beanType = rootBeanDefinition.getBeanClass(); for (Iterator iterator = lifecycleMap.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); Class lifecycleInterface = (Class) entry.getKey(); LifecycleMethods value = (LifecycleMethods) entry.getValue(); if (lifecycleInterface.isAssignableFrom(beanType)) { if (rootBeanDefinition.getInitMethodName() == null) { rootBeanDefinition.setInitMethodName(value.initMethodName); } if (rootBeanDefinition.getDestroyMethodName() == null) { rootBeanDefinition.setDestroyMethodName(value.destroyMethodName); } if (rootBeanDefinition.getInitMethodName() != null && rootBeanDefinition.getDestroyMethodName() != null) { return; } } } } }; visitor.visitBeanFactory(beanFactory, null); }
1,122,492
public SparkTab(Icon icon, String text) { setLayout(new GridBagLayout()); selectedBorderColor = new Color(173, 0, 0); // setBackground(backgroundColor); this.actualText = text; iconLabel = new JLabel(icon); iconLabel.setOpaque(false); textLabel = new JLabel(text); // add Label add(iconLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(3, 2, 3, 2), 0, 0)); // add text label add(textLabel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(3, 2, 3, 5), 0, 0)); // Set fonts defaultFont = new Font("Dialog", Font.PLAIN, 11); textLabel.setFont(defaultFont); }
public SparkTab(Icon icon, String text) { setLayout(new GridBagLayout()); selectedBorderColor = new Color(173, 0, 0); // setBackground(backgroundColor); this.actualText = text; iconLabel = new JLabel(icon); iconLabel.setOpaque(false); textLabel = new JLabel(text); // add Label add(iconLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(3, 2, 3, 2), 0, 0)); // add text label add(textLabel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(3, 2, 3, 10), 0, 0)); // Set fonts defaultFont = new Font("Dialog", Font.PLAIN, 11); textLabel.setFont(defaultFont); }
1,122,493
final public Template getTemplate(String fileName) { File tFile = findTemplate (fileName); Template t = null; try { t = new FileTemplate (_broker, tFile); t.parse (); _lastModifiedCache.put (fileName, new Long (tFile.lastModified())); return t; } catch (NullPointerException npe) { _log.warning ("TemplateProvider: Template not found: " + fileName, npe); } catch (Exception e) { // this probably occured b/c of a parsing error. // should throw some kind of ParseErrorException here instead _log.warning ("TemplateProvider: Error occured while getting " + fileName, e); } return null; }
final public Template getTemplate(String fileName) { File tFile = findTemplate (fileName); Template t = null; try { t = new FileTemplate (_broker, tFile); t.parse (); _lastModifiedCache.put (fileName, new Long (tFile.lastModified())); return t; } catch (NullPointerException npe) { _log.warning ("TemplateProvider: Template not found: " + fileName); } catch (Exception e) { // this probably occured b/c of a parsing error. // should throw some kind of ParseErrorException here instead _log.warning ("TemplateProvider: Error occured while getting " + fileName, e); } return null; }
1,122,494
public int getIntegerSetting(String key, int defaultValue) { if (containsKey(key)) { return getIntegerSetting(key); } else { return defaultValue; } }
public int getIntegerSetting(String key, int defaultValue) { if (containsKey(key)) { return getIntegerSetting(key); } else { return defaultValue; } }
1,122,496
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.black); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
1,122,497
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
1,122,498
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new ImagePanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
1,122,499
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
1,122,500
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
public TitlePanel(String title, String description, Icon icon, boolean showDescription) { // Set the icon iconLabel.setIcon(icon); // Set the title setTitle(title); // Set the description setDescription(description); setLayout(gridBagLayout); if (showDescription) { add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(descriptionLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 9, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); setBackground(Color.white); titleLabel.setFont(new Font("Verdana", Font.BOLD, 11)); descriptionLabel.setFont(new Font("Verdana", 0, 10)); } else { final JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new GridBagLayout()); panel.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); panel.add(iconLabel, new GridBagConstraints(2, 0, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.setBackground(new Color(49, 106, 197)); titleLabel.setFont(new Font("Verdana", Font.BOLD, 13)); titleLabel.setForeground(Color.white); descriptionLabel.setFont(new Font("Verdana", 0, 10)); add(panel, new GridBagConstraints(0, 0, 1, 0, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); } }
1,122,501
private void makesureStandardFolderisCreated() { IWUserContext iwuc = getIWUserContext(); IWSlideService slideService = getIWSlideService(iwuc); String contentFolderPath = ArticleUtil.getContentRootPath(); String articlePath = ArticleUtil.getArticleRootPath(); try { //first make the folder: slideService.createAllFoldersInPathAsRoot(articlePath); WebdavResource resource = slideService.getWebdavResourceAuthenticatedAsRoot(contentFolderPath); AccessControlList aclList = slideService.getAccessControlList(contentFolderPath); AuthenticationBusiness authBusiness = ((IWSlideServiceBean)slideService).getAuthenticationBusiness(); String editorRoleUri = authBusiness.getRoleURI(StandardRoles.ROLE_KEY_EDITOR); Ace editorAce = new Ace(editorRoleUri); editorAce.addPrivilege(Privilege.READ); editorAce.addPrivilege(Privilege.WRITE); //editorAce.addPrivilege(Privilege.READ); //editorAce.setInherited(true); AccessControlEntry editorEntry = new AccessControlEntry(editorAce,AccessControlEntry.PRINCIPAL_TYPE_ROLE); aclList.add(editorEntry); String authorRoleUri = authBusiness.getRoleURI(StandardRoles.ROLE_KEY_AUTHOR); Ace authorAce = new Ace(authorRoleUri); authorAce.addPrivilege(Privilege.READ); authorAce.addPrivilege(Privilege.WRITE); //editorAce.addPrivilege(Privilege.READ); //editorAce.setInherited(true); AccessControlEntry authorEntry = new AccessControlEntry(authorAce,AccessControlEntry.PRINCIPAL_TYPE_ROLE); aclList.add(authorEntry); slideService.storeAccessControlList(aclList); //debug: aclList = slideService.getAccessControlList(contentFolderPath); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }
private void makesureStandardFolderisCreated() { IWUserContext iwuc = getIWUserContext(); IWSlideService slideService = getIWSlideService(iwuc); String contentFolderPath = ArticleUtil.getContentRootPath(); String articlePath = ArticleUtil.getArticleRootPath(); try { //first make the folder: slideService.createAllFoldersInPathAsRoot(articlePath); AccessControlList aclList = slideService.getAccessControlList(contentFolderPath); AuthenticationBusiness authBusiness = ((IWSlideServiceBean)slideService).getAuthenticationBusiness(); String editorRoleUri = authBusiness.getRoleURI(StandardRoles.ROLE_KEY_EDITOR); Ace editorAce = new Ace(editorRoleUri); editorAce.addPrivilege(Privilege.READ); editorAce.addPrivilege(Privilege.WRITE); //editorAce.addPrivilege(Privilege.READ); //editorAce.setInherited(true); AccessControlEntry editorEntry = new AccessControlEntry(editorAce,AccessControlEntry.PRINCIPAL_TYPE_ROLE); aclList.add(editorEntry); String authorRoleUri = authBusiness.getRoleURI(StandardRoles.ROLE_KEY_AUTHOR); Ace authorAce = new Ace(authorRoleUri); authorAce.addPrivilege(Privilege.READ); authorAce.addPrivilege(Privilege.WRITE); //editorAce.addPrivilege(Privilege.READ); //editorAce.setInherited(true); AccessControlEntry authorEntry = new AccessControlEntry(authorAce,AccessControlEntry.PRINCIPAL_TYPE_ROLE); aclList.add(authorEntry); slideService.storeAccessControlList(aclList); //debug: aclList = slideService.getAccessControlList(contentFolderPath); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }
1,122,502
protected void prettifyBody() { String body = getBody(); if(body!=null){// System.out.println("ArticleIn = "+articleIn); //Use JTidy to clean up the html Tidy tidy = new Tidy(); tidy.setXHTML(true); tidy.setXmlOut(true); tidy.setCharEncoding(Configuration.UTF8); ByteArrayInputStream bais; try { bais = new ByteArrayInputStream(body.getBytes("UTF-8")); ByteArrayOutputStream baos = new ByteArrayOutputStream(); tidy.parse(bais, baos); body = baos.toString(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } // System.out.println("ArticleOut = "+articleOut); setBody(body); } }
protected void prettifyBody() { String body = getBody(); if(body!=null){// System.out.println("ArticleIn = "+articleIn); //Use JTidy to clean up the html Tidy tidy = new Tidy(); tidy.setXHTML(true); tidy.setXmlOut(true); tidy.setCharEncoding(Configuration.UTF8); ByteArrayInputStream bais; try { bais = new ByteArrayInputStream(body.getBytes("UTF-8")); ByteArrayOutputStream baos = new ByteArrayOutputStream(); tidy.parse(bais, baos); body = baos.toString("UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } // System.out.println("ArticleOut = "+articleOut); setBody(body); } }
1,122,503
public static String getContentRootPath(){ return ContentUtil.getContentRootPath(); }
public static String getContentRootPath(){ return ContentUtil.getContentBaseFolderPath(); }
1,122,504
public TranscriptWindow() { setEditable(false); /* Load Preferences for this instance */ PreferenceManager preferenceManager = SparkManager.getPreferenceManager(); chatPref = (ChatPreferences)preferenceManager.getPreferenceData(ChatPreference.NAMESPACE); addMouseListener(this); addMouseMotionListener(this); setDragEnabled(true); final TranscriptWindow window = this; addContextMenuListener(new ContextMenuListener() { public void poppingUp(Object component, JPopupMenu popup) { Action printAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SparkManager.printChatTranscript(window); } }; Action clearAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { clear(); } }; printAction.putValue(Action.NAME, "Print"); printAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.PRINTER_IMAGE_16x16)); clearAction.putValue(Action.NAME, "Clear"); clearAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.ERASER_IMAGE)); popup.addSeparator(); popup.add(printAction); popup.add(clearAction); } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); // Make sure ctrl-c works getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control c"), "copy"); getActionMap().put("copy", new AbstractAction("copy") { public void actionPerformed(ActionEvent evt) { StringSelection ss = new StringSelection(getSelectedText()); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null); } }); }
public TranscriptWindow() { setEditable(false); /* Load Preferences for this instance */ PreferenceManager preferenceManager = SparkManager.getPreferenceManager(); addMouseListener(this); addMouseMotionListener(this); setDragEnabled(true); final TranscriptWindow window = this; addContextMenuListener(new ContextMenuListener() { public void poppingUp(Object component, JPopupMenu popup) { Action printAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SparkManager.printChatTranscript(window); } }; Action clearAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { clear(); } }; printAction.putValue(Action.NAME, "Print"); printAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.PRINTER_IMAGE_16x16)); clearAction.putValue(Action.NAME, "Clear"); clearAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.ERASER_IMAGE)); popup.addSeparator(); popup.add(printAction); popup.add(clearAction); } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); // Make sure ctrl-c works getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control c"), "copy"); getActionMap().put("copy", new AbstractAction("copy") { public void actionPerformed(ActionEvent evt) { StringSelection ss = new StringSelection(getSelectedText()); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null); } }); }
1,122,505
private String getDate(Date insertDate) { chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); if (insertDate == null) { insertDate = new Date(); } StyleConstants.setFontFamily(styles, font.getFontName()); StyleConstants.setFontSize(styles, font.getSize()); if (chatPref.showDatesInChat()) { final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a"); final String date = formatter.format(insertDate); return "[" + date + "] "; } lastUpdated = insertDate; return ""; }
private String getDate(Date insertDate) { final LocalPreferences pref = SettingsManager.getLocalPreferences(); if (insertDate == null) { insertDate = new Date(); } StyleConstants.setFontFamily(styles, font.getFontName()); StyleConstants.setFontSize(styles, font.getSize()); if (chatPref.showDatesInChat()) { final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a"); final String date = formatter.format(insertDate); return "[" + date + "] "; } lastUpdated = insertDate; return ""; }
1,122,506
private String getDate(Date insertDate) { chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); if (insertDate == null) { insertDate = new Date(); } StyleConstants.setFontFamily(styles, font.getFontName()); StyleConstants.setFontSize(styles, font.getSize()); if (chatPref.showDatesInChat()) { final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a"); final String date = formatter.format(insertDate); return "[" + date + "] "; } lastUpdated = insertDate; return ""; }
private String getDate(Date insertDate) { chatPref = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); if (insertDate == null) { insertDate = new Date(); } StyleConstants.setFontFamily(styles, font.getFontName()); StyleConstants.setFontSize(styles, font.getSize()); if (pref.isTimeDisplayedInChat()) { final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a"); final String date = formatter.format(insertDate); return "[" + date + "] "; } lastUpdated = insertDate; return ""; }
1,122,507
public void saveTranscript(String fileName, List transcript, String headerData) { try { SimpleDateFormat formatter; File defaultSaveFile = new File(new File(Spark.getUserHome()), fileName); final JFileChooser fileChooser = new JFileChooser(defaultSaveFile); fileChooser.setSelectedFile(defaultSaveFile); // Show save dialog; this method does not return until the dialog is closed int result = fileChooser.showSaveDialog(this); final File selFile = fileChooser.getSelectedFile(); if (selFile != null && result == JFileChooser.APPROVE_OPTION) { final StringBuffer buf = new StringBuffer(); final Iterator transcripts = transcript.iterator(); buf.append("<html><body>"); if (headerData != null) { buf.append(headerData); } buf.append("<table width=600>"); while (transcripts.hasNext()) { final Message message = (Message)transcripts.next(); String from = message.getFrom(); if (from == null) { from = chatPref.getNickname(); } if (Message.Type.GROUP_CHAT == message.getType()) { if (ModelUtil.hasLength(StringUtils.parseResource(from))) { from = StringUtils.parseResource(from); } } final String body = message.getBody(); final Date insertionDate = (Date)message.getProperty("insertionDate"); formatter = new SimpleDateFormat("hh:mm:ss"); String value = ""; if (insertionDate != null) { value = "[" + formatter.format(insertionDate) + "] "; } buf.append("<tr><td nowrap><font size=2>").append(value).append("<strong>").append(from).append(":</strong>&nbsp;").append(body).append("</font></td></tr>"); } buf.append("</table></body></html>"); final BufferedWriter writer = new BufferedWriter(new FileWriter(selFile)); writer.write(buf.toString()); writer.close(); JOptionPane.showMessageDialog(SparkManager.getMainWindow(), "Chat transcript has been saved.", "Chat Transcript Saved", JOptionPane.INFORMATION_MESSAGE); } } catch (Exception ex) { Log.error("Unable to save chat transcript.", ex); JOptionPane.showMessageDialog(SparkManager.getMainWindow(), "Could not save transcript.", "Error", JOptionPane.ERROR_MESSAGE); } }
public void saveTranscript(String fileName, List transcript, String headerData) { try { SimpleDateFormat formatter; File defaultSaveFile = new File(new File(Spark.getUserHome()), fileName); final JFileChooser fileChooser = new JFileChooser(defaultSaveFile); fileChooser.setSelectedFile(defaultSaveFile); // Show save dialog; this method does not return until the dialog is closed int result = fileChooser.showSaveDialog(this); final File selFile = fileChooser.getSelectedFile(); if (selFile != null && result == JFileChooser.APPROVE_OPTION) { final StringBuffer buf = new StringBuffer(); final Iterator transcripts = transcript.iterator(); buf.append("<html><body>"); if (headerData != null) { buf.append(headerData); } buf.append("<table width=600>"); while (transcripts.hasNext()) { final Message message = (Message)transcripts.next(); String from = message.getFrom(); if (from == null) { from = pref.getNickname(); } if (Message.Type.GROUP_CHAT == message.getType()) { if (ModelUtil.hasLength(StringUtils.parseResource(from))) { from = StringUtils.parseResource(from); } } final String body = message.getBody(); final Date insertionDate = (Date)message.getProperty("insertionDate"); formatter = new SimpleDateFormat("hh:mm:ss"); String value = ""; if (insertionDate != null) { value = "[" + formatter.format(insertionDate) + "] "; } buf.append("<tr><td nowrap><font size=2>").append(value).append("<strong>").append(from).append(":</strong>&nbsp;").append(body).append("</font></td></tr>"); } buf.append("</table></body></html>"); final BufferedWriter writer = new BufferedWriter(new FileWriter(selFile)); writer.write(buf.toString()); writer.close(); JOptionPane.showMessageDialog(SparkManager.getMainWindow(), "Chat transcript has been saved.", "Chat Transcript Saved", JOptionPane.INFORMATION_MESSAGE); } } catch (Exception ex) { Log.error("Unable to save chat transcript.", ex); JOptionPane.showMessageDialog(SparkManager.getMainWindow(), "Could not save transcript.", "Error", JOptionPane.ERROR_MESSAGE); } }
1,122,508
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); FastWriter out = new FastWriter(resp.getOutputStream(), resp.getCharacterEncoding()); out.write("<html><head><title>WebMacro Error</title></head>"); out.write("<body><h1><font color=\"red\">WebMacro Error: "); out.write("</font></h1><pre>"); out.write(_problem); out.write("</pre>"); out.write("Please contat the server administrator"); out.flush(); out.close(); } catch (Exception e) { _log.error(_problem,e); } return; } } try { context = newContext(req,resp); boolean timing = context.isTiming(); if (timing) context.startTiming("WMServlet",req.getRequestURI()); Template t; try { if (timing) context.startTiming("handle"); t = handle(context); } finally { context.stopTiming(); } if (t != null) { execute(t,context); } context.startTiming("WMServlet.destroyContext()"); try { destroyContext(context); } finally { if (timing) context.stopTiming(); } } catch (HandlerException e) { if (context == null) { context = _wcPrototype.newInstance(req,resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "Your handler was unable to process the request successfully " + "for some reason. Here are the details:<p>" + e); execute(tmpl,context); } catch (Exception e) { if (context == null) { context = _wcPrototype.newInstance(req,resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "The handler WebMacro used to handle this request failed for " + "some reason. This is likely a bug in the handler written " + "for this application. Here are the details:<p>" + e); execute(tmpl,_wcPrototype.newInstance(req,resp)); } finally { context.stopTiming(); context.clear(); } }
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); FastWriter out = new FastWriter(resp.getOutputStream(), resp.getCharacterEncoding()); out.write("<html><head><title>WebMacro Error</title></head>"); out.write("<body><h1><font color=\"red\">WebMacro Error: "); out.write("</font></h1><pre>"); out.write(_problem); out.write("</pre>"); out.write("Please contat the server administrator"); out.flush(); out.close(); } catch (Exception e) { _log.error(_problem,e); } return; } } try { context = newContext(req,resp); timing = Flags.PROFILE && context.isTiming(); if (timing) context.startTiming("WMServlet",req.getRequestURI()); Template t; try { if (timing) context.startTiming("handle"); t = handle(context); } finally { context.stopTiming(); } if (t != null) { execute(t,context); } context.startTiming("WMServlet.destroyContext()"); try { destroyContext(context); } finally { if (timing) context.stopTiming(); } } catch (HandlerException e) { if (context == null) { context = _wcPrototype.newInstance(req,resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "Your handler was unable to process the request successfully " + "for some reason. Here are the details:<p>" + e); execute(tmpl,context); } catch (Exception e) { if (context == null) { context = _wcPrototype.newInstance(req,resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "The handler WebMacro used to handle this request failed for " + "some reason. This is likely a bug in the handler written " + "for this application. Here are the details:<p>" + e); execute(tmpl,_wcPrototype.newInstance(req,resp)); } finally { context.stopTiming(); context.clear(); } }
1,122,509
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); FastWriter out = new FastWriter(resp.getOutputStream(), resp.getCharacterEncoding()); out.write("<html><head><title>WebMacro Error</title></head>"); out.write("<body><h1><font color=\"red\">WebMacro Error: "); out.write("</font></h1><pre>"); out.write(_problem); out.write("</pre>"); out.write("Please contat the server administrator"); out.flush(); out.close(); } catch (Exception e) { _log.error(_problem,e); } return; } } try { context = newContext(req,resp); boolean timing = context.isTiming(); if (timing) context.startTiming("WMServlet",req.getRequestURI()); Template t; try { if (timing) context.startTiming("handle"); t = handle(context); } finally { context.stopTiming(); } if (t != null) { execute(t,context); } context.startTiming("WMServlet.destroyContext()"); try { destroyContext(context); } finally { if (timing) context.stopTiming(); } } catch (HandlerException e) { if (context == null) { context = _wcPrototype.newInstance(req,resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "Your handler was unable to process the request successfully " + "for some reason. Here are the details:<p>" + e); execute(tmpl,context); } catch (Exception e) { if (context == null) { context = _wcPrototype.newInstance(req,resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "The handler WebMacro used to handle this request failed for " + "some reason. This is likely a bug in the handler written " + "for this application. Here are the details:<p>" + e); execute(tmpl,_wcPrototype.newInstance(req,resp)); } finally { context.stopTiming(); context.clear(); } }
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); FastWriter out = new FastWriter(resp.getOutputStream(), resp.getCharacterEncoding()); out.write("<html><head><title>WebMacro Error</title></head>"); out.write("<body><h1><font color=\"red\">WebMacro Error: "); out.write("</font></h1><pre>"); out.write(_problem); out.write("</pre>"); out.write("Please contat the server administrator"); out.flush(); out.close(); } catch (Exception e) { _log.error(_problem,e); } return; } } try { context = newContext(req,resp); boolean timing = context.isTiming(); if (timing) context.startTiming("WMServlet",req.getRequestURI()); Template t; try { if (timing) context.startTiming("handle"); t = handle(context); } finally { if (timing) context.stopTiming(); } if (t != null) { execute(t,context); } context.startTiming("WMServlet.destroyContext()"); try { destroyContext(context); } finally { if (timing) if (timing) context.stopTiming(); } } catch (HandlerException e) { if (context == null) { context = _wcPrototype.newInstance(req,resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "Your handler was unable to process the request successfully " + "for some reason. Here are the details:<p>" + e); execute(tmpl,context); } catch (Exception e) { if (context == null) { context = _wcPrototype.newInstance(req,resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "The handler WebMacro used to handle this request failed for " + "some reason. This is likely a bug in the handler written " + "for this application. Here are the details:<p>" + e); execute(tmpl,_wcPrototype.newInstance(req,resp)); } finally { if (timing) context.stopTiming(); context.clear(); } }
1,122,510