buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private static String findValue(int i, String rawText) { StringBuffer buf = new StringBuffer(); String rawTextAux = rawText.substring(i); for (int index = 0; index < rawTextAux.length(); index++) { char c = rawTextAux.charAt(index); if (c == '(') { // We look for a new AI. If it doesn...
private static String findValue(int i, String rawText) { StringBuffer buf = new StringBuffer(); String rawTextAux = rawText.substring(i); for (int index = 0; index < rawTextAux.length(); index++) { char c = rawTextAux.charAt(index); if (c == '(') { // We look for a new AI. If it doesn...
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) { File jbossDD = new File(getConfig().descriptorDir, ddPrefix + JBOSS_DD); if (jbossDD.exists()) { ejbFiles.put(META_DIR + JBOSS_DD, jbossDD); } else { log("Unable to locate jboss deployment descriptor...
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) { File jbossDD = new File(getConfig().descriptorDir, ddPrefix + JBOSS_DD); if (jbossDD.exists()) { ejbFiles.put(META_DIR + JBOSS_DD, jbossDD); } else { log("Unable to locate jboss deployment descriptor...
public void testJar1() throws IOException { List args = new ArrayList(); args.add("-outjar"); args.add("out/lib.jar"); args.add("-classpath"); args.add("../runtime/bin"); args.add("-d"); args.add("out"); args.add("testdata/src1/binary/lib/ConcreteA.aj"); args.add("testdata/src1/binary/lib/Abst...
public void testJar1() throws IOException { List args = new ArrayList(); args.add("-outjar"); args.add("out/lib.jar"); args.add("-classpath"); args.add("../runtime/bin"); args.add("-d"); args.add("out"); args.add("testdata/src1/binary/lib/ConcreteA.aj"); args.add("testdata/src1/binary/lib/Abst...
public void execute() { Message savedMessage = message; try { Mailer mailer = null; // prepare for the auto select mechanism boolean autoFound = false; // try MIME format if (encoding.equals(MIME) || (encoding.equals(AUTO...
public void execute() { Message savedMessage = message; try { Mailer mailer = null; // prepare for the auto select mechanism boolean autoFound = false; // try MIME format if (encoding.equals(MIME) || (encoding.equals(AUTO...
public void run () { XPCOM.XPCOMGlueShutdown (); } }); // the following is intentionally commented, because calling XRE_TermEmbedding // causes subsequent browser instantiations within the process to fail // int size = XPCOM.nsDynamicFunctionLoad_sizeof (); // /* alloc memory...
public void run () { XPCOM.XPCOMGlueShutdown (); } }); // the following is intentionally commented, because calling XRE_TermEmbedding // causes subsequent browser instantiations within the process to fail // int size = XPCOM.nsDynamicFunctionLoad_sizeof (); // /* alloc memory...
private File resolveFile(String fileName) { if (rootDirectory == null) { return getProject().resolveFile(fileName); } return FILE_UTILS.resolveFile(rootDirectory, fileName); }
private File resolveFile(String fileName) { if (rootDirectory == null) { return FILE_UTILS.resolveFile(getProject().getBaseDir(),fileName); } return FILE_UTILS.resolveFile(rootDirectory, fileName); }
public void testPage() throws Exception { tester.getApplication().mount(new IndexedParamUrlCodingStrategy("/page2", Page2.class)); executeTest(Page1.class, "IndexedParamTest_ExpectedResult-1.html"); // Click the autolink tester.setupRequestAndResponse(); WebRequestCycle cycle = tester.createRequestCycle()...
public void testPage() throws Exception { tester.getApplication().mount(new IndexedParamUrlCodingStrategy("/page2", Page2.class)); executeTest(Page1.class, "IndexedParamTest_ExpectedResult-1.html"); // Click the autolink tester.setupRequestAndResponse(); WebRequestCycle cycle = tester.createRequestCycle()...
protected PerformanceMeter createMeter(String id) { Performance performance = Performance.getDefault(); String scenarioId = performance.getDefaultScenarioId(this); if (id != null) scenarioId += ": " + id; PerformanceMeter meter = performance.createPerformanceMeter(scenarioId); performance.tagAsSummary(meter, id, D...
protected PerformanceMeter createMeter(String id) { Performance performance = Performance.getDefault(); String scenarioId = performance.getDefaultScenarioId(this); if (id != null) scenarioId += ": " + id; PerformanceMeter meter = performance.createPerformanceMeter(scenarioId); performance.tagAsSummary(meter, scena...
protected XSAttributeDecl traverseGlobal(Element attrDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { // General Attribute Checking Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, true, sc...
protected XSAttributeDecl traverseGlobal(Element attrDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { // General Attribute Checking Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, true, sc...
protected void traverseLocal(XSParticleDecl particle, Element elmDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar, int allContextFlags) { // General Attribute Checking Object[] attrValues = fAttrChecke...
protected void traverseLocal(XSParticleDecl particle, Element elmDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar, int allContextFlags) { // General Attribute Checking Object[] attrValues = fAttrChecke...
public void testGetContainersOne() throws Exception { IContainer[] c = createContainers(1); assertNotNull(c); IContainer [] containers = containerManager.getAllContainers(); assertNotNull(containers); assertTrue(containers.length == 1); }
public void testGetContainersOne() throws Exception { IContainer[] c = createContainers(1); assertNotNull(c); IContainer [] containers = containerManager.getAllContainers(); assertNotNull(containers); //assertTrue(containers.length == 1); }
public IInterpreterRunner getInterpreterRunner(String mode) { final IInterpreterRunner runner = super.getInterpreterRunner(mode); if (runner != null) { return runner; } if (mode.equals(ILaunchManager.RUN_MODE)) { return new MarkLogicRunner(this); } ...
public IInterpreterRunner getInterpreterRunner(String mode) { IInterpreterRunner runner = super.getInterpreterRunner(mode); if (runner != null) { return runner; } if (mode.equals(ILaunchManager.RUN_MODE)) { return new MarkLogicRunner(this); } ...
public void testspawn() { project.executeTarget("init"); if (project.getProperty("test.can.run") == null) { return; } myBuild = new MonitoredBuild(new File(BUILD_FILE), "spawn"); FileUtils fileutils = FileUtils.newFileUtils(); logFile = fileutils.createTe...
public void testspawn() { project.executeTarget("init"); if (project.getProperty("test.can.run") == null) { return; } myBuild = new MonitoredBuild(new File(System.getProperty("root"), BUILD_FILE), "spawn"); FileUtils fileutils = FileUtils.newFileUtils(); ...
private Manifest getManifest(String filename) throws IOException, ManifestException { FileReader r = new FileReader(filename); try { return new Manifest(r); } finally { r.close(); } }
private Manifest getManifest(String filename) throws IOException, ManifestException { FileReader r = new FileReader(new File(System.getProperty("root"), filename)); try { return new Manifest(r); } finally { r.close(); } }
private void doTest(String msg, boolean keepRoot, boolean collapse, boolean semantic, boolean include, boolean localRoot) { Enumeration iter = getFiles(new File("src/etc/testcases/taskdefs/xmlproperty/inputs")); while (iter.hasMoreElements()) { File in...
private void doTest(String msg, boolean keepRoot, boolean collapse, boolean semantic, boolean include, boolean localRoot) { Enumeration iter = getFiles(new File(System.getProperty("root"), "src/etc/testcases/taskdefs/xmlproperty/inputs")); while (iter.hasMoreEleme...
public void setUp() { configureProject(TASKDEFS_DIR + "jspc.xml"); baseDir = new File(TASKDEFS_DIR); outDir = new File(baseDir, "jsp/java"); }
public void setUp() { configureProject(TASKDEFS_DIR + "jspc.xml"); baseDir = new File(System.getProperty("root"), TASKDEFS_DIR); outDir = new File(baseDir, "jsp/java"); }
public void testNoFileJUnitNoFrames() { executeTarget("reports1"); if (new File("src/etc/testcases/taskdefs/optional/junitreport/test/html/junit-noframes.html").exists()) { fail("No file junit-noframes.html expected"); } }
public void testNoFileJUnitNoFrames() { executeTarget("reports1"); if (new File(System.getProperty("root"), "src/etc/testcases/taskdefs/optional/junitreport/test/html/junit-noframes.html").exists()) { fail("No file junit-noframes.html expected"); } }
public void setUp() { project = new Project(); project.setBasedir("."); project.setProperty("build.sysclasspath", "ignore"); cloneVm = System.getProperty("build.clonevm"); if (cloneVm != null) { System.setProperty("build.clonevm", "false"); } }
public void setUp() { project = new Project(); project.setBasedir(System.getProperty("root")); project.setProperty("build.sysclasspath", "ignore"); cloneVm = System.getProperty("build.clonevm"); if (cloneVm != null) { System.setProperty("build.clonevm", "false"); ...
public void testSelectionBehaviour() { PresentSelector s; String results; Mapper m; Mapper.MapperType identity = new Mapper.MapperType(); identity.setValue("identity"); Mapper.MapperType glob = new Mapper.MapperType(); glob.setValue("glob"); Mapper.Map...
public void testSelectionBehaviour() { PresentSelector s; String results; Mapper m; Mapper.MapperType identity = new Mapper.MapperType(); identity.setValue("identity"); Mapper.MapperType glob = new Mapper.MapperType(); glob.setValue("glob"); Mapper.Map...
package org.apache.wicket.pageStore; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Ve...
package org.apache.wicket.pageStore; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Ve...
public static Manifest getDefaultManifest() throws BuildException { try { String defManifest = "/org/apache/tools/ant/defaultManifest.mf"; InputStream in = Manifest.class.getResourceAsStream(defManifest); if (in == null) { throw new BuildException("Could n...
public static Manifest getDefaultManifest() throws BuildException { try { String defManifest = "/org/apache/tools/ant/defaultManifest.mf"; InputStream in = Manifest.class.getResourceAsStream(defManifest); if (in == null) { throw new BuildException("Could n...
private Boolean needsEnhance(String clsName, Class redef, byte[] bytes) { if (redef != null) { Class[] intfs = redef.getInterfaces(); for (int i = 0; i < intfs.length; i++) if (PersistenceCapable.class.getName(). equals(intfs[i].getName())) ...
private Boolean needsEnhance(String clsName, Class redef, byte[] bytes) { if (redef != null) { Class[] intfs = redef.getInterfaces(); for (int i = 0; i < intfs.length; i++) if (PersistenceCapable.class.getName(). equals(intfs[i].getName())) ...
public synchronized Object clone() { if (isReference()) { return (getRef(getProject())).clone(); } else { try { AbstractFileSet fs = (AbstractFileSet) super.clone(); fs.defaultPatterns = (PatternSet) defaultPatterns.clone(); fs....
public synchronized Object clone() { if (isReference()) { return (getRef(getProject())).clone(); } else { try { AbstractFileSet fs = (AbstractFileSet) super.clone(); fs.defaultPatterns = (PatternSet) defaultPatterns.clone(); fs....
public ApacheLicenceHeaderTest() { // addHeaders = true; velocityIgnore = new String[]{ "src/test/java/wicket/contrib/velocity/testTemplate.vm" }; }
public ApacheLicenceHeaderTest() { // addHeaders = true; velocityIgnore = new String[]{ "src/test/java/org/apache/wicket/contrib/velocity/testTemplate.vm" }; }
public interface IBufferedWebResponse /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, V...
public interface IBufferedWebResponse /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, V...
protected void normalizeDocument(CoreDocumentImpl document, DOMConfigurationImpl config) { fDocument = document; fConfiguration = config; // intialize and reset DOMNormalizer component // fSymbolTable = (SymbolTable) fConfiguration.getProperty(DOMConfigurationImpl.SYMBOL_TABLE); // reset namespace conte...
protected void normalizeDocument(CoreDocumentImpl document, DOMConfigurationImpl config) { fDocument = document; fConfiguration = config; // intialize and reset DOMNormalizer component // fSymbolTable = (SymbolTable) fConfiguration.getProperty(DOMConfigurationImpl.SYMBOL_TABLE); // reset namespace conte...
public void registerForValueUpdate(String...values) { if (values == null) return; for (String key : values) { Value value = getRepository().getConfiguration() .getValue(key); if (value != null) value.setListener(this); } }
public void registerForValueUpdate(String...values) { if (values == null) return; for (String key : values) { Value value = getRepository().getConfiguration() .getValue(key); if (value != null) value.addListener(this); } }
public void setLayoutDeferred (boolean defer) { if (!defer) { if (--layoutCount == 0) { if ((state & LAYOUT_CHILD) != 0 || (state & LAYOUT_NEEDED) != 0) { updateLayout (true); } } } else { layoutCount++; } } boolean setScrollBarVisible (ScrollBar bar, boolean visible) { boolean changed = super.setS...
public void setLayoutDeferred (boolean defer) { if (!defer) { if (--layoutCount == 0) { if ((state & LAYOUT_CHILD) != 0 || (state & LAYOUT_NEEDED) != 0) { updateLayout (true); } } } else { layoutCount++; } } boolean setScrollBarVisible (ScrollBar bar, boolean visible) { boolean changed = super.setS...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public AggregateTransformer createReport() { AggregateTransformer transformer = new AggregateTransformer( this ); transformers.add( transformer ); return transformer; }
public AggregateTransformer createReport() { AggregateTransformer transformer = new AggregateTransformer( getContext() ); transformers.add( transformer ); return transformer; }
public void run() { startTests(); } }); } }
public void run() { startTests(); } }).start(); } }
protected void runTest() throws Throwable { if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceII(); else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream")) test_ConstructorLorg_eclipse_swt_graphics_Dev...
protected void runTest() throws Throwable { if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceII(); else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream")) test_ConstructorLorg_eclipse_swt_graphics_Dev...
public void tearDown() { //executeTarget("cleanup"); }
public void tearDown() { executeTarget("cleanup"); }
public static void log(String message, Throwable e) { getDefault().log( new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, "Caught exception", e)); //$NON-NLS-1$ }
public static void log(String message, Throwable e) { getDefault().log( new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, message, e)); }
private static final List LOCALES = Arrays.asList(new Locale[] { Locale.ENGLISH, new Locale("nl"), Locale.GERMAN, Locale.SIMPLIFIED_CHINESE, Locale.JAPANESE, new Locale("pt", "BR"), new Locale("fa", "IR"), new Locale("da", "DK"),
private static final List LOCALES = Arrays.asList(new Locale[] { Locale.ENGLISH, new Locale("nl", "NL"), Locale.GERMAN, Locale.SIMPLIFIED_CHINESE, Locale.JAPANESE, new Locale("pt", "BR"), new Locale("fa", "IR"), new Locale("da", "DK"),
public void testOutjarDeletedOnError () { String[] args = new String[] {"-aspectpath", aspectjarName, "-injars", injarName, "-outjar", outjarName}; Message error = new Message(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE,"jar1.Parent")); MessageSpec spec = new MessageSpec(null,newMessageList(error)); Co...
public void testOutjarDeletedOnError () { String[] args = new String[] {"-aspectpath", aspectjarName, "-injars", injarName, "-outjar", outjarName}; Message error = new Message(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_INTERFACES,"jar1.Parent")); MessageSpec spec = new MessageSpec(null,newMessageList(er...
private TypePattern resolveBindingsFromFullyQualifiedTypeName(String fullyQualifiedName, IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) { String originalName = fullyQualifiedName; ResolvedType resolvedTypeInTheWorld = null; UnresolvedType type; //System.out.println("res...
private TypePattern resolveBindingsFromFullyQualifiedTypeName(String fullyQualifiedName, IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) { String originalName = fullyQualifiedName; ResolvedType resolvedTypeInTheWorld = null; UnresolvedType type; //System.out.println("res...
if (dp > de) /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this di...
if (dp > de) /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this di...
public synchronized Object connect(ID remote, Object data, int timeout) throws ECFException { if (connection != null) throw new ECFException("already connected"); if (timeout > 0) SmackConfiguration.setPacketReplyTimeout(timeout); Roster.setDefaultSubscriptionMode(Roster.SUBSCRIPTION_MANUAL); final X...
public synchronized Object connect(ID remote, Object data, int timeout) throws ECFException { if (connection != null) throw new ECFException("already connected"); if (timeout > 0) SmackConfiguration.setPacketReplyTimeout(timeout); Roster.setDefaultSubscriptionMode(Roster.SUBSCRIPTION_MANUAL); final X...
protected void cleanUp() { if (addedWebXmlFile == null && needxmlfile && !isInUpdateMode()) { throw new BuildException("No WEB-INF/web.xml file was added.\n" + "If this is your intent, set needxml='false' "); } addedWebXmlFile = null; super.cleanUp(); ...
protected void cleanUp() { if (addedWebXmlFile == null && deploymentDescriptor==null && needxmlfile && !isInUpdateMode()) { throw new BuildException("No WEB-INF/web.xml file was added.\n" + "If this is your intent, set needxml='false' "); } addedWebXmlFile = n...
private static Map weavingAdaptors = new WeakHashMap(); static WeavingAdaptor getWeaver(ClassLoader loader) { synchronized (weavingAdaptors) { WeavingAdaptor weavingAdaptor = (WeavingAdaptor) weavingAdaptors.get(loader); if (weavingAdaptor == null) { ...
private static Map weavingAdaptors = new WeakHashMap(); static WeavingAdaptor getWeaver(ClassLoader loader) { synchronized (weavingAdaptors) { WeavingAdaptor weavingAdaptor = (WeavingAdaptor) weavingAdaptors.get(loader); if (weavingAdaptor == null) { ...
public EntityManagerFactory createEntityManagerFactory(String name, String resource, Map m) { ConfigurationProviderImpl cp = new ConfigurationProviderImpl(); try { if (cp.load(name, resource, m)) return OpenJPAPersistence.toEntityManagerFactory( ...
public EntityManagerFactory createEntityManagerFactory(String name, String resource, Map m) { ConfigurationProviderImpl cp = new ConfigurationProviderImpl(); try { if (cp.load(resource, name, m)) return OpenJPAPersistence.toEntityManagerFactory( ...
public XMLConfiguration() { super(false, false); // override the default and the current value of lock manager plugin // from our superclass to use the single-jvm lock manager lockManagerPlugin.setDefault("version"); lockManagerPlugin.setString("version"); ProductDe...
public XMLConfiguration() { super(false, false); // override the default and the current value of lock manager plugin // from our superclass to use the single-jvm lock manager lockManagerPlugin.setDefault("version"); lockManagerPlugin.setString("version"); ProductDe...
public void run() { if (!display.isDisposed() && !browser.isDisposed()) listener.changed(progress); } } ); } /* * Note. numberWithInt uses autorelease. The resulting object * does not need to be released. * identifier = [NSNumber numberWithInt: resourceCount++] */ int identifier = Coc...
public void run() { if (!display.isDisposed() && !browser.isDisposed()) listener.changed(progress); } } ); } /* * Note. numberWithInt uses autorelease. The resulting object * does not need to be released. * identifier = [NSNumber numberWithInt: resourceCount++] */ int identifier = Coc...
private boolean extensionFileExists() { InputStream is = null; try { is = ResourceLoaderFactory.createResourceLoader().getResourceAsStream (_extensionFile.replace (SyntaxConstants.NS_DELIM, "/") + XtendFile.FILE_EXTENSION); } catch (Exception exc) { // do noth...
private boolean extensionFileExists() { InputStream is = null; try { is = ResourceLoaderFactory.createResourceLoader().getResourceAsStream (_extensionFile.replace (SyntaxConstants.NS_DELIM, "/") + "." +XtendFile.FILE_EXTENSION); } catch (Exception exc) { // do...
public void testEclipse() throws Exception { final BufferedReader eclipse = new BufferedReader( new FileReader(getFileFromHome("eclipse.classpath"))); // assume default charset is OK here // <classpathentry kind="lib" path="lib/geronimo-jms_1.1_spec-1.1.1.jar"/> // <classpathentry ...
public void testEclipse() throws Exception { final BufferedReader eclipse = new BufferedReader( new FileReader(getFileFromHome("eclipse.classpath"))); // assume default charset is OK here // <classpathentry kind="lib" path="lib/geronimo-jms_1.1_spec-1.1.1.jar"/> // <classpathentry ...
protected boolean render(Graphics2D graphics) { drawCircle(graphics); return true; } }); // Simple model new Image(this, "image4", new Model("Image2.gif")); // Dynamically created buffered image new Image(this, "image5", getImage5Resource()); // Add okay button image new Image(this, "o...
protected boolean render(Graphics2D graphics) { drawCircle(graphics); return true; } }); // Simple model new Image(this, "image4", new Model<String>("Image2.gif")); // Dynamically created buffered image new Image(this, "image5", getImage5Resource()); // Add okay button image new Image(...
public final User authenticate(final String username, final String password) { if (user == null) { // Trivial password "db" if ("wicket".equalsIgnoreCase(username) && "wicket".equalsIgnoreCase(password)) { // Create User object final User user = new User(); user.setName(username); final...
public final User authenticate(final String username, final String password) { if (user == null) { // Trivial password "db" if ("wicket".equalsIgnoreCase(username) && "wicket".equalsIgnoreCase(password)) { // Create User object final User user = new User(); user.setName(username); final...
public String getStringValue() { if (!isRunningVersion()) { log.debug("Not running version, return raw function string"); return function.getRawParameters(); } else { log.debug("Running version, executing function"); int ite...
public String getStringValue() { if (!isRunningVersion() || !JMeterContextService.getContext().isSamplingStarted()) { log.debug("Not running version, return raw function string"); return function.getRawParameters(); } else { log.debug("...
private void determineIds() { String[] ids = null; try { ids = Utils.getIds(file, "encryption"); } catch (Exception ex) { ids = new String[] {}; } cEncryptionId.setItems(ids); cEncryptionId.select(0); }
private void determineIds() { String[] ids = null; try { ids = Utils.getIds(file.getContents(), "encryption"); } catch (Exception ex) { ids = new String[] {}; } cEncryptionId.setItems(ids); cEncryptionId.select(0); }
private void determineIds() { try { ids = Utils.getAllIds(file); } catch (Exception ex) { ids = new String[] {}; } }
private void determineIds() { try { ids = Utils.getAllIds(file.getContents()); } catch (Exception ex) { ids = new String[] {}; } }
public void run() { if (styledText == null) return; int i; long start = System.currentTimeMillis(); for (i = 0; i < lineCount; i++) { if (lineHeight[i] == -1 || lineWidth[i] == -1) { calculate(i, 1); if (System.currentTimeMillis() - start > IDLE_TIME) break; } } if (i < lineCount) ...
public void run() { if (styledText == null) return; int i; long start = System.currentTimeMillis(); for (i = 0; i < lineCount; i++) { if (lineHeight[i] == -1 || lineWidth[i] == -1) { calculate(i, 1); if (System.currentTimeMillis() - start > IDLE_TIME) break; } } if (i < lineCount) ...
public boolean eval() throws BuildException { //validate if (file1 == null || file2 == null) { throw new BuildException("both file1 and file2 are required in fileequals"); } //#now match the files boolean matches=false; try { matches=...
public boolean eval() throws BuildException { //validate if (file1 == null || file2 == null) { throw new BuildException("both file1 and file2 are required in filesmatch"); } //#now match the files boolean matches=false; try { matches=...
public Result isComponentOnAjaxResponse(Component component) { String failMessage = "A component which is null could not have been added to the AJAX response"; notNull(failMessage, component); // Get the AJAX response String ajaxResponse = getServletResponse().getDocument(); // Test that the previous resp...
public Result isComponentOnAjaxResponse(Component component) { String failMessage = "A component which is null could not have been added to the AJAX response"; notNull(failMessage, component); // Get the AJAX response String ajaxResponse = getServletResponse().getDocument(); // Test that the previous resp...
public void handleEvent (Event e) { TextTransfer transfer = TextTransfer.getInstance(); String data = (String)cb.getContents(transfer); if (data != null) { text.insert(data); } } }); FormData data = new FormData(); data.right = new FormAttachment(100, -5); data.top = new FormAttachment(0, 5); ...
public void handleEvent (Event e) { TextTransfer transfer = TextTransfer.getInstance(); String data = (String)cb.getContents(transfer); if (data != null) { text.insert(data); } } }); FormData data = new FormData(); data.right = new FormAttachment(100, -5); data.top = new FormAttachment(0, 5); ...
public AppendingStringBuffer filter(AppendingStringBuffer responseBuffer) { int headIndex = responseBuffer.indexOf("<head>"); int bodyIndex = responseBuffer.indexOf("</body>"); long timeTaken = System.currentTimeMillis() - RequestCycle.get().getStartTime(); if (headIndex != -1 && bodyIndex != -1) { Map<S...
public AppendingStringBuffer filter(AppendingStringBuffer responseBuffer) { int headIndex = responseBuffer.indexOf("<head>"); int bodyIndex = responseBuffer.indexOf("</body>"); long timeTaken = System.currentTimeMillis() - RequestCycle.get().getStartTime(); if (headIndex != -1 && bodyIndex != -1) { Map<S...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); Rectangle trim = super.computeTrim (x, y, width, height); Rect rect = new Rect (); OS.GetWindowStructureWidths (shellHandle, rect); trim.x -= rect.left; trim.y -= rect.top; trim.width += rect.left + rect.right; trim.height += re...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); Rectangle trim = super.computeTrim (x, y, width, height); Rect rect = new Rect (); OS.GetWindowStructureWidths (shellHandle, rect); trim.x -= rect.left; trim.y -= rect.top; trim.width += rect.left + rect.right; trim.height += re...
public JDBCSamplerBeanInfo() { super(JDBCSampler.class); createPropertyGroup("varName", new String[] { "dataSource" }); createPropertyGroup("sql", new String[] { "queryType", "query" }); PropertyDescriptor p = property("dataSource"); p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, ""); p...
public JDBCSamplerBeanInfo() { super(JDBCSampler.class); createPropertyGroup("varName", new String[] { "dataSource" }); createPropertyGroup("sql", new String[] { "queryType", "query" }); PropertyDescriptor p = property("dataSource"); p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, ""); p...
public FileTransferID(Namespace namespace, URL url) { super(namespace); Assert.isNotNull(url, Messages.FileTransferID_Exception_Url_Not_Null); //$NON-NLS-1$ this.fileURL = url; }
public FileTransferID(Namespace namespace, URL url) { super(namespace); Assert.isNotNull(url, Messages.FileTransferID_Exception_Url_Not_Null); this.fileURL = url; }
protected void setupContainer(String type) throws Exception { container = ContainerFactory.getDefault().makeContainer(type); socontainer = (ISharedObjectContainer) container.getAdapter(ISharedObjectContainer.class); }
protected void setupContainer(String type) throws Exception { container = ContainerFactory.getDefault().createContainer(type); socontainer = (ISharedObjectContainer) container.getAdapter(ISharedObjectContainer.class); }
protected void setupDiscovery() throws Exception { try { socontainer = ContainerFactory.getDefault().makeContainer( DISCOVERY_CONTAINER); discovery = (IDiscoveryContainer) socontainer .getAdapter(IDiscoveryContainer.class); if (discovery != null) { socontainer.connect(null, null); } else { ...
protected void setupDiscovery() throws Exception { try { socontainer = ContainerFactory.getDefault().createContainer( DISCOVERY_CONTAINER); discovery = (IDiscoveryContainer) socontainer .getAdapter(IDiscoveryContainer.class); if (discovery != null) { socontainer.connect(null, null); } else ...
public synchronized IDataGraphSharing getInstance( ISharedObjectContainer container) throws ECFException { ISharedObjectManager mgr = container.getSharedObjectManager(); ID id = IDFactory.getDefault().makeStringID(DataGraphSharing.DATA_GRAPH_SHARING_ID); DataGraphSharing result =...
public synchronized IDataGraphSharing getInstance( ISharedObjectContainer container) throws ECFException { ISharedObjectManager mgr = container.getSharedObjectManager(); ID id = IDFactory.getDefault().createStringID(DataGraphSharing.DATA_GRAPH_SHARING_ID); DataGraphSharing result...
public ISynchAsynchConnection makeInstance( ConnectionDescription description, ISynchAsynchConnectionEventHandler handler, Class[] clazzes, Object[] args) throws ConnectionInstantiationException; }
public ISynchAsynchConnection createInstance( ConnectionDescription description, ISynchAsynchConnectionEventHandler handler, Class[] clazzes, Object[] args) throws ConnectionInstantiationException; }
public IContainer makeInstance(ContainerDescription description, Class[] argTypes, Object[] args) throws ContainerInstantiationException; }
public IContainer createInstance(ContainerDescription description, Class[] argTypes, Object[] args) throws ContainerInstantiationException; }
public IContainer makeInstance( ContainerDescription description, Class[] argTypes, Object[] args) throws ContainerInstantiationException { try { JMDNSDiscoveryContainer container = new JMDNSDiscoveryContainer(); return container; } catch (IDInstantiationException e) { ContainerInstantiationExc...
public IContainer createInstance( ContainerDescription description, Class[] argTypes, Object[] args) throws ContainerInstantiationException { try { JMDNSDiscoveryContainer container = new JMDNSDiscoveryContainer(); return container; } catch (IDInstantiationException e) { ContainerInstantiationE...
public IContainer makeInstance( ContainerDescription description, Class[] argTypes, Object[] args) throws ContainerInstantiationException { try { Integer ka = new Integer(XMPPSClientSOContainer.DEFAULT_KEEPALIVE); String name = null; if...
public IContainer createInstance( ContainerDescription description, Class[] argTypes, Object[] args) throws ContainerInstantiationException { try { Integer ka = new Integer(XMPPSClientSOContainer.DEFAULT_KEEPALIVE); String name = null; ...
protected ISynchAsynchConnection makeConnection(ID remoteSpace, Object data) throws ConnectionInstantiationException { ISynchAsynchConnection conn = null; boolean google = false; boolean secure = false; if (remoteSpace instanceof XMPPID) { XMPPID theID = (XMPPID) remoteSpace; String host = theID.getHo...
protected ISynchAsynchConnection createConnection(ID remoteSpace, Object data) throws ConnectionInstantiationException { ISynchAsynchConnection conn = null; boolean google = false; boolean secure = false; if (remoteSpace instanceof XMPPID) { XMPPID theID = (XMPPID) remoteSpace; String host = theID.get...
public synchronized ID getLocalID() { if (!isConnected()) return null; try { return IDFactory.getDefault().makeID(namespace.getName(), new Object[] { connection .getConnectionID() }); } catch (Exception e) { logException("Exception in getLocalID", e); return null; } }
public synchronized ID getLocalID() { if (!isConnected()) return null; try { return IDFactory.getDefault().createID(namespace.getName(), new Object[] { connection .getConnectionID() }); } catch (Exception e) { logException("Exception in getLocalID", e); return null; } }
public Object[] toParameterArray(StoreQuery q, Map userParams) { Object[] array = new Object[userParams.size()]; Set<Map.Entry<Object,Object>> userSet = userParams.entrySet(); for (Map.Entry<Object,Object> userEntry : userSet) { int idx = ((Integer)userEntry....
public synchronized Object[] toParameterArray(StoreQuery q, Map userParams) { Object[] array = new Object[userParams.size()]; Set<Map.Entry<Object,Object>> userSet = userParams.entrySet(); for (Map.Entry<Object,Object> userEntry : userSet) { int idx = ((Integ...
private byte[] getBodySent(byte[] responseData) throws IOException { // Find the data sent to the mirror server, which the mirror server is sending back to us // We assume the headers are in ISO_8859_1, and the body can be in any content encoding. // Therefore we get the data sent in ISO_885...
private byte[] getBodySent(byte[] responseData) throws IOException { // Find the data sent to the mirror server, which the mirror server is sending back to us // We assume the headers are in ISO_8859_1, and the body can be in any content encoding. // Therefore we get the data sent in ISO_885...
public COMObject(int[] argCounts) { int[] callbackAddresses = new int[argCounts.length]; for (int i = 0, length = argCounts.length; i < length; i++){ if ((Callbacks[i][argCounts[i]]) == null) { Callbacks[i][argCounts[i]] = new Callback(this.getClass(), "callback"+i, argCounts[i] + 1, true); //$NON-NLS-1$ } c...
public COMObject(int[] argCounts) { int[] callbackAddresses = new int[argCounts.length]; for (int i = 0, length = argCounts.length; i < length; i++){ if ((Callbacks[i][argCounts[i]]) == null) { Callbacks[i][argCounts[i]] = new Callback(this.getClass(), "callback"+i, argCounts[i] + 1, true, COM.E_FAIL); //$NON-NL...
public IRemoteServiceContainer[] selectHostContainers( ServiceReference serviceReference, String[] serviceExportedInterfaces, String[] serviceExportedConfigs, String[] serviceIntents) { // Find previously created containers that match the given // serviceExportedConfigs and serviceIntents Collection rsC...
public IRemoteServiceContainer[] selectHostContainers( ServiceReference serviceReference, String[] serviceExportedInterfaces, String[] serviceExportedConfigs, String[] serviceIntents) { // Find previously created containers that match the given // serviceExportedConfigs and serviceIntents Collection rsC...
public IRemoteServiceContainer[] selectConsumerContainers( EndpointDescription endpointDescription); }
public IRemoteServiceContainer selectConsumerContainer( EndpointDescription endpointDescription); }
public void setURI(String uri) throws BuildException { if (uri.equals(ProjectHelper.ANT_CORE_URI)) { uri = ""; } if (uri.startsWith("ant:") && !uri.startsWith("antlib:")) { throw new BuildException("Attempt to use use a reserved URI " + uri); } this.ur...
public void setURI(String uri) throws BuildException { if (uri.equals(ProjectHelper.ANT_CORE_URI)) { uri = ""; } if (uri.startsWith("ant:") && !uri.startsWith("antlib:")) { throw new BuildException("Attempt to use a reserved URI " + uri); } this.uri = ...
public void testExcluded() { expectBuildExceptionContaining( "excluded", "excluded uri", "Attempt to use use a reserved URI ant:notallowed"); }
public void testExcluded() { expectBuildExceptionContaining( "excluded", "excluded uri", "Attempt to use a reserved URI ant:notallowed"); }
TypeLib[] getTypeLibs(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.myrmidon.components.m...
TypeLib[] getTypeLibs(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.myrmidon.components.m...
public void setWidth (int value) { checkWidget (); value = Math.max (value, 0); if (width == value) return; /* same value */ parent.updateColumnWidth (this, value); } void updateFont (GC gc) { computeDisplayText (gc); } /* * Perform any internal changes necessary to reflect a changed width. */ void updateW...
public void setWidth (int value) { checkWidget (); value = Math.max (value, 0); if (width == value) return; /* same value */ parent.updateColumnWidth (this, value); } void updateFont (GC gc) { computeDisplayText (gc); } /* * Perform any internal changes necessary to reflect a changed width. */ void updateW...
protected void checkValueSpace (String content) throws InvalidDatatypeValueException { if (getLength( content) <= 0) { throw new InvalidDatatypeValueException( "Value '"+content+"' is not encoded in Base64" ); } }
protected void checkValueSpace (String content) throws InvalidDatatypeValueException { if (getLength( content) < 0) { throw new InvalidDatatypeValueException( "Value '"+content+"' is not encoded in Base64" ); } }
protected void checkValueSpace (String content) throws InvalidDatatypeValueException { if (getLength(content) <= 0) { throw new InvalidDatatypeValueException( "Value '"+content+"' is not encoded in Hex" ); } }
protected void checkValueSpace (String content) throws InvalidDatatypeValueException { if (getLength(content) < 0) { throw new InvalidDatatypeValueException( "Value '"+content+"' is not encoded in Hex" ); } }
public static final boolean autoCreateProxyContainer = new Boolean( System .getProperty( "org.eclipse.ecf.osgi.services.distribution.autoCreateProxyContainer", "true")).booleanValue();
public static final boolean autoCreateProxyContainer = new Boolean( System .getProperty( "org.eclipse.ecf.osgi.services.distribution.autoCreateProxyContainer", "false")).booleanValue();
public Rectangle getBounds (int index) { checkWidget(); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); RECT rect = getBounds (index, true, true, true); int width = rect.right - rect.left, height = rect.bottom - rect.top; return new Rectangle (rect.left, rect.top, width, height); } RECT get...
public Rectangle getBounds (int index) { checkWidget(); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); RECT rect = getBounds (index, true, true, true); int width = rect.right - rect.left, height = rect.bottom - rect.top; return new Rectangle (rect.left, rect.top, width, height); } RECT get...
public final long skip(final long n) throws IOException { if (n < 0L) { throw new IllegalArgumentException("skip value is negative"); } for (long i = 0; i < n; i++) { if (in.read() == -1) { return i; } } return n; }
public final long skip(final long n) throws IOException { if (n < 0L) { throw new IllegalArgumentException("skip value is negative"); } for (long i = 0; i < n; i++) { if (read() == -1) { return i; } } return n; }
private static Collection<Object> getObjects(Class<?> extendsClass) throws Exception { String exName = extendsClass.getName(); Object myThis = ""; Iterator<String> classes = ClassFinder .findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { extendsClass }).iterato...
private static Collection<Object> getObjects(Class<?> extendsClass) throws Exception { String exName = extendsClass.getName(); Object myThis = ""; Iterator<String> classes = ClassFinder .findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { extendsClass }).iterato...
String getCacheKey(final MarkupContainer container, Class containerClass); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this fi...
String getCacheKey(final MarkupContainer container, Class containerClass); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this fi...
public static void log(String message, Throwable e) { getDefault().getLog().log( new Status(IStatus.ERROR, ClientPlugin.getDefault().getBundle().getSymbolicName(), IStatus.OK, "Caught exception", e)); }
public static void log(String message, Throwable e) { getDefault().getLog().log( new Status(IStatus.ERROR, ClientPlugin.getDefault().getBundle().getSymbolicName(), IStatus.OK, message, e)); }
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData(); data.style = checkStyle(style); int gdkGC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(S...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData(); data.style = checkStyle(style); int gdkGC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(S...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData(); data.style = checkStyle(style); int /*long*/ gdkGC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SW...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData(); data.style = checkStyle(style); int /*long*/ gdkGC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SW...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData(); data.style = checkStyle(style); int xGC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData(); data.style = checkStyle(style); int xGC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT...
public GC(Drawable drawable, int style) { int flags = OS.PtEnter(0); try { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData (); data.style = checkStyle(style); int hDC = drawable.internal_new_GC (data); Device device = data.device; if (device == null) device = Device.getD...
public GC(Drawable drawable, int style) { int flags = OS.PtEnter(0); try { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData (); data.style = checkStyle(style); int hDC = drawable.internal_new_GC (data); Device device = data.device; if (device == null) device = Device.getD...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData (); data.style = checkStyle(style); int hDC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SW...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData (); data.style = checkStyle(style); int hDC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SW...
/* Initialize my private state */ master.pass_number = 0; master.using_merged_upsample = use_merged_upsample(cinfo); /* Color quantizer selection */ master.quantizer_1pass = null; master.quantizer_2pass = null; /* No mode changes if not using buffered-image mode. */ if (! cinfo.quantize_colors || ! cinfo.buffe...
/* Initialize my private state */ master.pass_number = 0; master.using_merged_upsample = use_merged_upsample(cinfo); /* Color quantizer selection */ master.quantizer_1pass = null; master.quantizer_2pass = null; /* No mode changes if not using buffered-image mode. */ if (! cinfo.quantize_colors || ! cinfo.buffe...
public final void addComponent(Component component) { addComponent(component.getId(), component); }
public final void addComponent(Component component) { addComponent(component.getMarkupId(), component); }
private final Page getPage(RequestCycle requestCycle) { if (page == null && pageClass != null && !requestCycle.getRedirect()) { page = newPage(pageClass, requestCycle); } return page; } }
protected final Page getPage(RequestCycle requestCycle) { if (page == null && pageClass != null && !requestCycle.getRedirect()) { page = newPage(pageClass, requestCycle); } return page; } }
public static String readFully(Reader rdr, int bufferSize) throws IOException { if (bufferSize <= 0) { throw new IllegalArgumentException("Buffer size must be greater " + "than 0"); } final char[] buffer = new char[bufferSize...
public static String readFully(Reader rdr, int bufferSize) throws IOException { if (bufferSize <= 0) { throw new IllegalArgumentException("Buffer size must be greater " + "than 0"); } final char[] buffer = new char[bufferSize...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); int trimX = x - marginWidth - highlight_margin - borderLeft; int trimWidth = width + borderLeft + borderRight + 2*marginWidth + 2*highlight_margin; if (minimized) { int trimY = onBottom ? y - borderTop : y - highlight_header - tab...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); int trimX = x - marginWidth - highlight_margin - borderLeft; int trimWidth = width + borderLeft + borderRight + 2*marginWidth + 2*highlight_margin; if (minimized) { int trimY = onBottom ? y - borderTop : y - highlight_header - tab...
public boolean getWideCaret() { checkWidget (); int /*long*/ layout = OS.GetKeyboardLayout (0); short langID = (short)OS.LOWORD (layout); return OS.PRIMARYLANGID (langID) == OS.LANG_KOREAN; } boolean isInlineEnabled () { if (OS.IsWinCE || OS.WIN32_VERSION < OS.VERSION (5, 1)) return false; return OS.IsDBLocale ...
public boolean getWideCaret() { checkWidget (); int /*long*/ layout = OS.GetKeyboardLayout (0); short langID = (short)OS.LOWORD (layout); return OS.PRIMARYLANGID (langID) == OS.LANG_KOREAN; } boolean isInlineEnabled () { if (OS.IsWinCE || OS.WIN32_VERSION < OS.VERSION (5, 1)) return false; return OS.IsDBLocale ...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); if ((style & SWT.ARROW) != 0) { // TODO use some OS metric instead of hardcoded values int width = wHint != SWT.DEFAULT ? wHint : 14; int height = hHint != SWT.DEFAULT ? hHint : 14; return new Point (width, height); } NSSize s...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); if ((style & SWT.ARROW) != 0) { // TODO use some OS metric instead of hardcoded values int width = wHint != SWT.DEFAULT ? wHint : 14; int height = hHint != SWT.DEFAULT ? hHint : 14; return new Point (width, height); } NSSize s...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = DEFAULT_WIDTH; int height = DEFAULT_HEIGHT; if ((style & SWT.SEPARATOR) != 0) { float /*double*/ lineWidth = ((NSBox)view).borderWidth (); if ((style & SWT.HORIZONTAL) != 0) { height = (int)Math.ceil (lineWidth * 2)...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = DEFAULT_WIDTH; int height = DEFAULT_HEIGHT; if ((style & SWT.SEPARATOR) != 0) { float /*double*/ lineWidth = ((NSBox)view).borderWidth (); if ((style & SWT.HORIZONTAL) != 0) { height = (int)Math.ceil (lineWidth * 2)...
public void showSelection () { checkWidget(); int index = getSelectionIndex (); if (index >= 0) showIndex (index); } void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { if (ignoreSelect) return; postEvent (SWT.Selection); } boolean tableView_shouldEditTableColumn_ro...
public void showSelection () { checkWidget(); int index = getSelectionIndex (); if (index >= 0) showIndex (index); } void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { if (ignoreSelect) return; postEvent (SWT.Selection); } boolean tableView_shouldEditTableColumn_ro...