rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
setDisplay(jobDisplay);
public UIJob(Display jobDisplay, String name) { super(name); setDisplay(jobDisplay); }
if (items.length == 0) return null; int lastItem = getLastItem(); lastItem = Math.min(items.length - 1, lastItem + 1); for (int i = topTabIndex; i <= lastItem; i++) { Rectangle bounds = items[i].getBounds(); if (bounds.contains(pt)) return items[i]; } return null;
if (index < 0 || index >= items.length) { SWT.error(SWT.ERROR_INVALID_RANGE); } return items[index];
public CTabItem getItem(Point pt) { //checkWidget(); if (items.length == 0) return null; int lastItem = getLastItem(); lastItem = Math.min(items.length - 1, lastItem + 1); for (int i = topTabIndex; i <= lastItem; i++) { Rectangle bounds = items[i].getBounds()...
public SearchPattern(String pattern, int allowedRules) { initializePatternAndMatchRule(pattern); matchRule = matchRule & allowedRules; if (matchRule == RULE_PATTERN_MATCH) { stringMatcher = new StringMatcher(stringPattern, true, false); }
public SearchPattern() { this(RULE_EXACT_MATCH | RULE_PREFIX_MATCH | RULE_PATTERN_MATCH | RULE_CAMELCASE_MATCH);
public SearchPattern(String pattern, int allowedRules) { initializePatternAndMatchRule(pattern); matchRule = matchRule & allowedRules; if (matchRule == RULE_PATTERN_MATCH) { stringMatcher = new StringMatcher(stringPattern, true, false); } }
public static RubyObject convertJavaToRuby(Ruby ruby, Object object, Class javaClass) {
public static RubyObject convertJavaToRuby(Ruby ruby, Object object) {
public static RubyObject convertJavaToRuby(Ruby ruby, Object object, Class javaClass) { if (object == null) { return ruby.getNil(); } if (javaClass == null) { javaClass = object.getClass(); } if (javaClass.isPrimitive()) { String cName = javaClass....
if (javaClass == null) { javaClass = object.getClass(); }
Class javaClass = object.getClass();
public static RubyObject convertJavaToRuby(Ruby ruby, Object object, Class javaClass) { if (object == null) { return ruby.getNil(); } if (javaClass == null) { javaClass = object.getClass(); } if (javaClass.isPrimitive()) { String cName = javaClass....
items[i] = convertJavaToRuby(ruby, Array.get(object, i), arrayClass);
items[i] = convertJavaToRuby(ruby, Array.get(object, i));
public static RubyObject convertJavaToRuby(Ruby ruby, Object object, Class javaClass) { if (object == null) { return ruby.getNil(); } if (javaClass == null) { javaClass = object.getClass(); } if (javaClass.isPrimitive()) { String cName = javaClass....
items[i] = convertJavaToRuby(ruby, ((List) object).get(i), null);
items[i] = convertJavaToRuby(ruby, ((List) object).get(i));
public static RubyObject convertJavaToRuby(Ruby ruby, Object object, Class javaClass) { if (object == null) { return ruby.getNil(); } if (javaClass == null) { javaClass = object.getClass(); } if (javaClass.isPrimitive()) { String cName = javaClass....
items[2 * i] = convertJavaToRuby(ruby, entry.getKey(), null); items[2 * i + 1] = convertJavaToRuby(ruby, entry.getValue(), null);
items[2 * i] = convertJavaToRuby(ruby, entry.getKey()); items[2 * i + 1] = convertJavaToRuby(ruby, entry.getValue());
public static RubyObject convertJavaToRuby(Ruby ruby, Object object, Class javaClass) { if (object == null) { return ruby.getNil(); } if (javaClass == null) { javaClass = object.getClass(); } if (javaClass.isPrimitive()) { String cName = javaClass....
public static String getCompanyId(ActionRequest req) { ActionRequestImpl reqImpl = (ActionRequestImpl)req;
public static String getCompanyId(HttpServletRequest req) { String companyId = (String)req.getSession().getAttribute(WebKeys.COMPANY_ID);
public static String getCompanyId(ActionRequest req) { ActionRequestImpl reqImpl = (ActionRequestImpl)req; return getCompanyId(reqImpl.getHttpServletRequest()); }
return getCompanyId(reqImpl.getHttpServletRequest());
if (companyId == null) { companyId = (String)req.getAttribute(WebKeys.COMPANY_ID); } return companyId;
public static String getCompanyId(ActionRequest req) { ActionRequestImpl reqImpl = (ActionRequestImpl)req; return getCompanyId(reqImpl.getHttpServletRequest()); }
if (totalPlannedSizeUploadingTo <= 5 * 1024 * 1024) {
if (noUploadYet || totalPlannedSizeUploadingTo <= 500 * 1024) {
private void checkQueuedUploads() { // Check uploads to start List<Upload> uploadsToStart = new LinkedList<Upload>(); Map<Member, Long> uploadSizeToStartNodes = new HashMap<Member, Long>(); List<Upload> uploadsToBreak = new ArrayList<Upload>(); if (logVerbose) { log().v...
public static void addListener(Object listenerSupport, Object listener) {
public static void addListener(ListenerInterface listenerSupport, ListenerInterface listener) {
public static void addListener(Object listenerSupport, Object listener) { if (listenerSupport == null) { throw new NullPointerException("Listener support is null"); } if (!Proxy.isProxyClass(listenerSupport.getClass())) { throw new IllegalArgumentException( ...
log().verbose( "Wrote " + chunk.data.length + " bytes to tempfile " + tempFile.getAbsolutePath());
public synchronized void addChunk(FileChunk chunk) { Reject.ifNull(chunk, "Chunk is null"); if (isBroken()) { return; } if (!isStarted()) { // donwload begins to start setStarted(); } lastTouch.setTime(System.currentTimeMillis()); // ...
Download(TransferManager tm, FileInfo file, boolean automatic) { super(tm, file, null); this.lastTouch = new Date(); this.automatic = automatic; this.queued = false; this.completed = false; this.tempFileError = false; File tempFile = getTempFile(); if (tempFile != null && tempFile.exists()) { String reason = ""; i...
public Download() {
Download(TransferManager tm, FileInfo file, boolean automatic) { super(tm, file, null); // from can be null this.lastTouch = new Date(); this.automatic = automatic; this.queued = false; this.completed = false; this.tempFileError = false; File tempFile = getTem...
if (myThread != null) { myThread.interrupt(); }
void shutdown() { super.shutdown(); if (myThread != null) { myThread.interrupt(); } }
public static void removeListener(Object listenerSupport, Object listener) {
public static void removeListener(Object listenerSupport, ListenerInterface listener) {
public static void removeListener(Object listenerSupport, Object listener) { if (listenerSupport == null) { throw new NullPointerException("Listener support is null"); } if (!Proxy.isProxyClass(listenerSupport.getClass())) { throw new IllegalArgumentException( ...
public String toDetailString() { String modifiedNick;
public final void toDetailString(StringBuilder str) { if (deleted) { str.append("(del) "); } str.append(toString()); str.append(", size: "); str.append(size); str.append(" bytes, version: "); str.append(getVersion()); str.append(", modified: "); str.append(lastModifiedDate); str.append(" ("); str.append(lastModifiedDat...
public String toDetailString() { String modifiedNick; if (modifiedBy == null) { modifiedNick = "-unknown-"; } else { modifiedNick = modifiedBy.nick; } return (deleted ? "(del) " : "") + toString() + ", size: " + size + " bytes, version: " + getVers...
modifiedNick = "-unknown-";
str.append("-unknown-");
public String toDetailString() { String modifiedNick; if (modifiedBy == null) { modifiedNick = "-unknown-"; } else { modifiedNick = modifiedBy.nick; } return (deleted ? "(del) " : "") + toString() + ", size: " + size + " bytes, version: " + getVers...
modifiedNick = modifiedBy.nick;
str.append(modifiedBy.nick);
public String toDetailString() { String modifiedNick; if (modifiedBy == null) { modifiedNick = "-unknown-"; } else { modifiedNick = modifiedBy.nick; } return (deleted ? "(del) " : "") + toString() + ", size: " + size + " bytes, version: " + getVers...
return (deleted ? "(del) " : "") + toString() + ", size: " + size + " bytes, version: " + getVersion() + ", modified: " + lastModifiedDate + " (" + lastModifiedDate.getTime() + ") by '" + modifiedNick + "'";
str.append("'");
public String toDetailString() { String modifiedNick; if (modifiedBy == null) { modifiedNick = "-unknown-"; } else { modifiedNick = modifiedBy.nick; } return (deleted ? "(del) " : "") + toString() + ", size: " + size + " bytes, version: " + getVers...
"****************** " + fileNameProblemEvent.getFolder() + " "
fileNameProblemEvent.getFolder() + " "
public void fileNameProblemsDetected( FileNameProblemEvent fileNameProblemEvent) { log().debug( "****************** " + fileNameProblemEvent.getFolder() + " " + fileNameProblemEvent.getScanResult().getProblemFiles()); final FilenameProblemDialog dialog = new...
final FilenameProblemDialog dialog = new FilenameProblemDialog(
FilenameProblemDialog dialog = new FilenameProblemDialog(
public void fileNameProblemsDetected( FileNameProblemEvent fileNameProblemEvent) { log().debug( "****************** " + fileNameProblemEvent.getFolder() + " " + fileNameProblemEvent.getScanResult().getProblemFiles()); final FilenameProblemDialog dialog = new...
Runnable runner = new Runnable() { public void run() { dialog.open(); } }; UIUtil.invokeLaterInEDT(runner);
dialog.open();
public void fileNameProblemsDetected( FileNameProblemEvent fileNameProblemEvent) { log().debug( "****************** " + fileNameProblemEvent.getFolder() + " " + fileNameProblemEvent.getScanResult().getProblemFiles()); final FilenameProblemDialog dialog = new...
this.queuedUploads = Collections.synchronizedList(new LinkedList()); this.activeUploads = Collections.synchronizedList(new LinkedList());
this.queuedUploads = Collections .synchronizedList(new LinkedList<Upload>()); this.activeUploads = Collections .synchronizedList(new LinkedList<Upload>());
public TransferManager(Controller controller) { super(controller); this.started = false; this.queuedUploads = Collections.synchronizedList(new LinkedList()); this.activeUploads = Collections.synchronizedList(new LinkedList()); this.downloads = new ConcurrentHashMap<FileInfo, Downl...
Upload upload; boolean isNew;
Upload oldUpload = null; Upload upload = new Upload(this, from, dl); if (upload.isBroken()) { return null; } synchronized (activeUploads) { synchronized (queuedUploads) { int oldUploadIndex = activeUploads.indexOf(upload); if (oldUploadIndex >= 0) { oldUpload = activeUploads.get(oldUploadIndex); activeUploads.remove...
public Upload queueUpload(Member from, RequestDownload dl) { if (dl == null || dl.file == null) { throw new NullPointerException("Downloadrequest/File is null"); } // Never upload db files !! if (Folder.DB_FILENAME.equalsIgnoreCase(dl.file.getName()) || Folder.DB_BA...
upload = new Upload(this, from, dl); if (upload.isBroken()) { return null; } if (!queuedUploads.contains(upload)) { log().verbose( "Upload enqueud: " + dl.file + ", startOffset: " + dl.startOffset + ", member: " + from); queuedUploads.add(upload); isNew = true; } else { isNew = false; log().warn( "Received already kn...
log().verbose( "Upload enqueud: " + dl.file + ", startOffset: " + dl.startOffset + ", to: " + from); queuedUploads.add(upload);
public Upload queueUpload(Member from, RequestDownload dl) { if (dl == null || dl.file == null) { throw new NullPointerException("Downloadrequest/File is null"); } // Never upload db files !! if (Folder.DB_FILENAME.equalsIgnoreCase(dl.file.getName()) || Folder.DB_BA...
if (isNew && !upload.isBroken()) {
if (!upload.isBroken()) {
public Upload queueUpload(Member from, RequestDownload dl) { if (dl == null || dl.file == null) { throw new NullPointerException("Downloadrequest/File is null"); } // Never upload db files !! if (Folder.DB_FILENAME.equalsIgnoreCase(dl.file.getName()) || Folder.DB_BA...
activeUploads.add(transfer);
activeUploads.add((Upload) transfer);
void setStarted(Transfer transfer) { if (transfer instanceof Upload) { synchronized (queuedUploads) { synchronized (activeUploads) { queuedUploads.remove(transfer); activeUploads.add(transfer); } } // Fire ev...
parseAndFireCommandEvent(theInputString, CommandEvent.Destination.BROKER);
command = commandParser.parseCommand(theInputString);
protected void handleKeyReleased(KeyEvent e) { Text theText = (Text) e.widget; String theInputString = theText.getText(); try { if ('\r' == e.character) { theText.setText(""); parseAndFireCommandEvent(theInputString, CommandEvent.Destination.BROKER); } else if (e.keyCode == 't' && ((e.stateMask & SWT...
parseAndFireCommandEvent(theInputString, CommandEvent.Destination.EDITOR);
command = commandParser.parseCommand(theInputString); command = new ShowOrderInTicketCommand(((MessageCommand)command).getMessage());
protected void handleKeyReleased(KeyEvent e) { Text theText = (Text) e.widget; String theInputString = theText.getText(); try { if ('\r' == e.character) { theText.setText(""); parseAndFireCommandEvent(theInputString, CommandEvent.Destination.BROKER); } else if (e.keyCode == 't' && ((e.stateMask & SWT...
} catch (NoMoreIDsException e1) { Application.getMainConsoleLogger().error("Ran out of ID's parsing command '"+theInputString +"'");
if (command != null){ command.execute(); }
protected void handleKeyReleased(KeyEvent e) { Text theText = (Text) e.widget; String theInputString = theText.getText(); try { if ('\r' == e.character) { theText.setText(""); parseAndFireCommandEvent(theInputString, CommandEvent.Destination.BROKER); } else if (e.keyCode == 't' && ((e.stateMask & SWT...
commandParser.init(factory);
commandParser.setIDFactory(factory);
public void setIDFactory(IDFactory factory) { commandParser.init(factory); }
public abstract Callback getMethod(String method, Class arg1);
public abstract Callback getMethod(String method);
public abstract Callback getMethod(String method, Class arg1);
LoggerAdapter.initializeLogger("unitTest"); return (new TestSuite(JCycloneStagesTest.class));
return (new MarketceteraTestSuite(JCycloneStagesTest.class, OrderManagementSystem.OMS_MESSAGE_BUNDLE_INFO));
public static Test suite() { LoggerAdapter.initializeLogger("unitTest"); return (new TestSuite(JCycloneStagesTest.class)); }
System.out.println("Initialized top-level Logger: "+name);
System.out.println(MessageKey.LOGGER_INIT.getLocalizedMessage(name));
public static LoggerAdapter initializeLogger(String name) { if(sLogger != null) { return sLogger; } sLogger = new LoggerAdapter(name); PropertyConfigurator.configureAndWatch(LOGGER_CONF_FILE, LOGGER_WATCH_DELAY); sLogger.setLevel(Level.ERROR); System.out.println("Initialized to...
public RubyObject funcall(String name) { return funcall(name, (RubyPointer) null);
public RubyObject funcall(String name, RubyObject[] args) { return funcall(name, new RubyPointer(args));
public RubyObject funcall(String name) { return funcall(name, (RubyPointer) null); }
public static void general( Level level, String msg, Throwable th ) { log( GENERAL, level, msg, th ); }
public static void general(String msg) { general(Level.INFO, msg); }
public static void general( Level level, String msg, Throwable th ) { log( GENERAL, level, msg, th ); }
LogFactory logFactory = new ScreenLogFactory(settings);
LogFactory logFactory = null; if (useJDBC) { logFactory = new CompositeLogFactory(new LogFactory[] {new JdbcLogFactory(settings), new ScreenLogFactory(settings)}); } else { logFactory = new ScreenLogFactory(settings); }
public void init(ConfigData config) throws Exception { mCurFixVersion = config.get(ConnectionConstants.FIX_VERSION_KEY, FIX_VERSION_DEFAULT); FIXDataDictionaryManager.setFIXVersion(mCurFixVersion); String senderCompID = config.get(ConnectionConstants.FIX_SENDER_COMP_ID, ""); String ta...
throw new ClassNotFoundException("Could not find class: " + className);
public final MessageFactory getMessageFactory() throws ClassNotFoundException { String className = "quickfix." + mQuickFIXPackage + ".MessageFactory"; try { Class messageFactoryClass = Class.forName(className); return (MessageFactory) messageFactoryClass.newInstance();...
throw new ClassNotFoundException(MessageKey.CLASS_DNE.getLocalizedMessage(className));
public final MessageFactory getMessageFactory() throws ClassNotFoundException { String className = "quickfix." + mQuickFIXPackage + ".MessageFactory"; try { Class messageFactoryClass = Class.forName(className); return (MessageFactory) messageFactoryClass.newInstance();...
public static void debug(String msg, Object inCat)
public void debug(String inMsg)
public static void debug(String msg, Object inCat) { getMyLogger(inCat).log(WRAPPER_FQCN, Level.DEBUG, msg, null); }
getMyLogger(inCat).log(WRAPPER_FQCN, Level.DEBUG, msg, null);
throw new IllegalArgumentException(MessageKey.LOGGER_MISSING_CAT.getLocalizedMessage());
public static void debug(String msg, Object inCat) { getMyLogger(inCat).log(WRAPPER_FQCN, Level.DEBUG, msg, null); }
public IOMetaClass(String name, Class clazz, RubyClass superClass, RubyModule parentModule) { super(name, clazz, superClass, parentModule);
public IOMetaClass(Ruby runtime) { this("IO", RubyIO.class, runtime.getClasses().getObjectClass());
public IOMetaClass(String name, Class clazz, RubyClass superClass, RubyModule parentModule) { super(name, clazz, superClass, parentModule); }
if (directory.alreadyHasFileOnDisk(file)) { return false; }
private boolean drop(File file, Directory directory) { // test if a dir is dropped if (file.isDirectory()) { Directory subDirectory = directory.getCreateSubDirectory(file .getName()); File[] files = file.listFiles(); total += ...
public FileListTransferable(Object[] files) { fileList = new ArrayList(Arrays.asList(files));
public FileListTransferable(Directory directory, Object[] files) { this.directory = directory; this.fileList = new ArrayList(Arrays.asList(files));
public FileListTransferable(Object[] files) { fileList = new ArrayList(Arrays.asList(files)); }
} else if (flavor.equals(Directory.getDataFlavour())) { return directory;
public synchronized Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException { if (flavor.equals(DataFlavor.javaFileListFlavor)) { return fileList; } else if (flavor.equals(DataFlavor.stringFlavor)) { return fileList.toStri...
draggedValues.toArray());
directoryTable.getDirectory(), draggedValues.toArray());
public void dragGestureRecognized(DragGestureEvent event) { Object[] selectedValues = getSelectionModel().getSelections(); if (event.getDragAction() == DnDConstants.ACTION_COPY && selectedValues != null) { List<File> draggedValues = getSelectedFiles...
List<File> fileList = (List<File>) trans .getTransferData(DataFlavor.javaFileListFlavor); List<File> selectedFiles = getSelectedFiles(); if (selectedFiles != null && fileList.size() == selectedFiles.size()) { if (selectedFiles.containsAll(fileList)) { return true; } } for (File file : fileList) { if (directoryTabl...
if (trans.isDataFlavorSupported(Directory.getDataFlavour())) { Directory directory = (Directory) trans .getTransferData(Directory.getDataFlavour()); return directoryTable.getDirectory() == directory;
public boolean amIDragSource(DropTargetDragEvent dtde) { Transferable trans = dtde.getTransferable(); try { List<File> fileList = (List<File>) trans .getTransferData(DataFlavor.javaFileListFlavor); List<File> selectedFiles = getSelectedFiles(); if (selec...
Preferences pref = getController().getPreferences();
private JComponent createFileDetailsPanel() { FileDetailsPanel fileDetailsPanel = new FileDetailsPanel( getController(), selectionModel); Preferences pref = getController().getPreferences(); // check property to enable preview // preview of images is memory hungry // ma...
List<FileInfo> filesToRemove = new ArrayList();
List<FileInfo> filesToRemove = new ArrayList<FileInfo>();
public void actionPerformed(ActionEvent e) { Object target = getUIController().getInformationQuarter() .getDisplayTarget(); final Folder folder; if (target instanceof Directory) { folder = ((Directory) target).getRootFolder(); } else if (target instanceof Folder) { ...
return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_FILETYPE), true);
return sortBy(FileInfoComparator.BY_FILETYPE, true);
public boolean sortBy(int columnIndex) { switch (columnIndex) { case 0 : return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_FILETYPE), true); case 1 : return sortBy(FileInfoComparator .getComparator(F...
return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_NAME), true);
return sortBy(FileInfoComparator.BY_NAME, true);
public boolean sortBy(int columnIndex) { switch (columnIndex) { case 0 : return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_FILETYPE), true); case 1 : return sortBy(FileInfoComparator .getComparator(F...
return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_SIZE), true);
return sortBy(FileInfoComparator.BY_SIZE, true);
public boolean sortBy(int columnIndex) { switch (columnIndex) { case 0 : return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_FILETYPE), true); case 1 : return sortBy(FileInfoComparator .getComparator(F...
return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_MEMBER), true);
return sortBy(FileInfoComparator.BY_MEMBER, true);
public boolean sortBy(int columnIndex) { switch (columnIndex) { case 0 : return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_FILETYPE), true); case 1 : return sortBy(FileInfoComparator .getComparator(F...
return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_MODIFIED_DATE), true);
return sortBy(FileInfoComparator.BY_MODIFIED_DATE, true);
public boolean sortBy(int columnIndex) { switch (columnIndex) { case 0 : return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_FILETYPE), true); case 1 : return sortBy(FileInfoComparator .getComparator(F...
return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_AVAILABILITY), true);
return sortBy(FileInfoComparator.BY_AVAILABILITY, true);
public boolean sortBy(int columnIndex) { switch (columnIndex) { case 0 : return sortBy(FileInfoComparator .getComparator(FileInfoComparator.BY_FILETYPE), true); case 1 : return sortBy(FileInfoComparator .getComparator(F...
public ISelection getSelection() { Control control = getControl(); if (control == null || control.isDisposed()) { return TreeSelection.EMPTY; } Widget[] items = getSelection(getControl()); ArrayList list = new ArrayList(items.length); for (int i = 0; i < items.length; i++) { Widget item = items[i]; if (item.getData() !...
protected abstract Item[] getSelection(Control control);
public ISelection getSelection() { Control control = getControl(); if (control == null || control.isDisposed()) { return TreeSelection.EMPTY; } Widget[] items = getSelection(getControl()); ArrayList list = new ArrayList(items.length); for (int i = 0; i < items.length; i++) { Widget item = items[i]; if (ite...
public WorkbenchPreferenceExtensionNode(String id, IPreferencePage preferencePage) { super(id, preferencePage);
public WorkbenchPreferenceExtensionNode(String id, IConfigurationElement configurationElement) { super(id); this.configurationElement = configurationElement;
public WorkbenchPreferenceExtensionNode(String id, IPreferencePage preferencePage) { super(id, preferencePage); }
protected void connect(Controller cont1, Controller cont2)
private void connect(Controller cont1, Controller cont2)
protected void connect(Controller cont1, Controller cont2) throws InterruptedException, ConnectionException { Reject.ifTrue(!cont1.isStarted(), "Controller1 not started yet"); Reject.ifTrue(!cont2.isStarted(), "Controller2 not started yet"); // Connect System.out.println("Conne...
boolean connected = false;
Member member2atCon1 = cont1.getNodeManager().getNode( cont2.getMySelf().getId()); Member member1atCon2 = cont2.getNodeManager().getNode( cont1.getMySelf().getId()); boolean connected = member2atCon1 != null && member1atCon2 != null && member2atCon1.isCompleteyConnected() && member1atCon2.isCompleteyConnected(); if (co...
protected void connect(Controller cont1, Controller cont2) throws InterruptedException, ConnectionException { Reject.ifTrue(!cont1.isStarted(), "Controller1 not started yet"); Reject.ifTrue(!cont2.isStarted(), "Controller2 not started yet"); // Connect System.out.println("Conne...
Member member2atCon1 = cont1.getNodeManager().getNode(
member2atCon1 = cont1.getNodeManager().getNode(
protected void connect(Controller cont1, Controller cont2) throws InterruptedException, ConnectionException { Reject.ifTrue(!cont1.isStarted(), "Controller1 not started yet"); Reject.ifTrue(!cont2.isStarted(), "Controller2 not started yet"); // Connect System.out.println("Conne...
Member member1atCon2 = cont2.getNodeManager().getNode(
member1atCon2 = cont2.getNodeManager().getNode(
protected void connect(Controller cont1, Controller cont2) throws InterruptedException, ConnectionException { Reject.ifTrue(!cont1.isStarted(), "Controller1 not started yet"); Reject.ifTrue(!cont2.isStarted(), "Controller2 not started yet"); // Connect System.out.println("Conne...
if (member2atCon1 != null && member1atCon2 != null) { if (member2atCon1.isCompleteyConnected() && member1atCon2.isCompleteyConnected()) { break; } }
connected = member2atCon1 != null && member1atCon2 != null && member2atCon1.isCompleteyConnected() && member1atCon2.isCompleteyConnected();
protected void connect(Controller cont1, Controller cont2) throws InterruptedException, ConnectionException { Reject.ifTrue(!cont1.isStarted(), "Controller1 not started yet"); Reject.ifTrue(!cont2.isStarted(), "Controller2 not started yet"); // Connect System.out.println("Conne...
public Member getNode(String id) { if (id == null) {
public Member getNode(MemberInfo mInfo) { if (mInfo == null) {
public Member getNode(String id) { if (id == null) { return null; } if (mySelf.getId().equals(id)) { return mySelf; } return (Member) knownNodes.get(id); }
if (mySelf.getId().equals(id)) { return mySelf; } return (Member) knownNodes.get(id);
return getNode(mInfo.id);
public Member getNode(String id) { if (id == null) { return null; } if (mySelf.getId().equals(id)) { return mySelf; } return (Member) knownNodes.get(id); }
System.out.println("Cleaning test dir (" + files.length
System.out.println("Cleaning test dir ("+ testDir + ") (" + files.length
public static void cleanTestDir() { File testDir = getTestDir(); File[] files = testDir.listFiles(); if (files == null) { return; } System.out.println("Cleaning test dir (" + files.length + " files/dirs)"); for (File file : files) { try { ...
if (0 != testDir.listFiles().length) { throw new IllegalStateException("cleaning test dir not succeded"); }
public static void cleanTestDir() { File testDir = getTestDir(); File[] files = testDir.listFiles(); if (files == null) { return; } System.out.println("Cleaning test dir (" + files.length + " files/dirs)"); for (File file : files) { try { ...
public static int len(Context c, InlineTextBox box) { return (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), c.getCurrentFont(), box.getSubstring()).getWidth());
public static int len(Context c, String str, Font font) { return (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), font, str).getWidth());
public static int len(Context c, InlineTextBox box) { return (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), c.getCurrentFont(), box.getSubstring()).getWidth()); }
jmsOperations.convertAndSend(fixMessage);
if (jmsOperations != null){ jmsOperations.convertAndSend(fixMessage); } else { internalMainLogger.error("Could not send message, not connected"); }
private void convertAndSend(Message fixMessage) { jmsOperations.convertAndSend(fixMessage); }
for (int fieldInt = 1; fieldInt < 2000; fieldInt++){
for (int fieldInt = 1; fieldInt < MAX_FIX_FIELDS; fieldInt++){
public static void fillFieldsFromExistingMessage(Message outgoingMessage, Message existingMessage) { try { String msgType = outgoingMessage.getHeader().getString(MsgType.FIELD); DataDictionary dict = FIXDataDictionaryManager.getDictionary(); for (int fieldInt = 1; fieldInt...
LoggerAdapter.error("Outgoing message did not have valid MsgType ", ex, LOGGER_NAME);
LoggerAdapter.error(MessageKey.FIX_OUTGOING_NO_MSGTYPE.getLocalizedMessage(), ex, LOGGER_NAME);
public static void fillFieldsFromExistingMessage(Message outgoingMessage, Message existingMessage) { try { String msgType = outgoingMessage.getHeader().getString(MsgType.FIELD); DataDictionary dict = FIXDataDictionaryManager.getDictionary(); for (int fieldInt = 1; fieldInt...
return "ConnectionHander " + remoteInfo;
return "ConnectionHandler " + remoteInfo;
public String getLoggerName() { String remoteInfo; if (socket != null) { InetSocketAddress addr = (InetSocketAddress) socket .getRemoteSocketAddress(); remoteInfo = addr.getAddress().getHostAddress() + "^" + addr.getPort(); } else { ...
LOG.warn("Recived buffer exceeds 128KB! " + Format.formatBytes(byteIn.length));
bufferExceeded = true;
public Object deserialize(InputStream in, int expectedSize, boolean expectCompression) throws IOException, ClassNotFoundException { byte[] byteIn = null; if (inBufferRef != null && inBufferRef.get() != null) { // Re-use old buffer byteIn = (byte[]) inBufferRef.get(); ...
return deserializeStatic(byteIn, expectCompression);
Object obj = deserializeStatic(byteIn, expectCompression); if (bufferExceeded) { LOG.warn("Recived buffer exceeds 128KB! " + Format.formatBytes(byteIn.length) + ". Message: " + obj); } return obj;
public Object deserialize(InputStream in, int expectedSize, boolean expectCompression) throws IOException, ClassNotFoundException { byte[] byteIn = null; if (inBufferRef != null && inBufferRef.get() != null) { // Re-use old buffer byteIn = (byte[]) inBufferRef.get(); ...
return addr.isLoopbackAddress() || addr.isSiteLocalAddress();
try { return addr.isLoopbackAddress() || addr.isSiteLocalAddress() || getAllLocalNetworkAddresses().containsKey(addr); } catch (SocketException e) { return false; }
public static boolean isOnLanOrLoopback(InetAddress addr) { Reject.ifNull(addr, "Address is null"); return addr.isLoopbackAddress() || addr.isSiteLocalAddress(); }
protected void clear(){ Control[] children = form.getBody().getChildren(); for (Control control : children) { if (control instanceof FIXComposite) { FIXComposite composite = (FIXComposite) control; composite.clear(); }
private void clear() { for (AbstractFIXExtractor extractor : extractors) { extractor.clearUI();
protected void clear(){ Control[] children = form.getBody().getChildren(); for (Control control : children) { if (control instanceof FIXComposite) { FIXComposite composite = (FIXComposite) control; composite.clear(); } } }
toolkit = new FormToolkit(parent.getDisplay()); form = toolkit.createForm(parent); GridLayout layout = new GridLayout(); form.getBody().setLayout(layout); DataDictionary dict = FIXDataDictionaryManager.getDictionary(); buySellControl = new FIXEnumeratedComposite(form.getBody(), SWT.NONE, toolkit, Side.FIELD, new Str...
GridData gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.verticalAlignment = GridData.END; top = new Composite(parent, SWT.NONE); top.setLayout(new GridLayout()); createForm(); errorMessageLabel = getFormToolkit().createLabel(top, ""); errorMe...
public void createPartControl(Composite parent) { toolkit = new FormToolkit(parent.getDisplay()); form = toolkit.createForm(parent); // form.setText("Stock Order Ticket"); GridLayout layout = new GridLayout(); form.getBody().setLayout(layout); // FIXDataDictionaryManager.loadDictionary(FIXDataDictionaryManager.F...
handleCancel();
handleSend();
public void mouseUp(MouseEvent e) { handleCancel(); }
validateForm();
protected void handleCancel() { clear(); validateForm(); }
try {
try { validator.validateAll();
protected void handleSend() { try { String orderID = Application.getIDFactory().getNext(); Message aMessage = FIXMessageUtil.newLimitOrder(new InternalID(orderID), Side.BUY, BigDecimal.ZERO, new MSymbol(""), BigDecimal.ZERO, TimeInForce.DAY, null); aMessage.removeField(Side.FIELD); ...
Message aMessage = FIXMessageUtil.newLimitOrder(new InternalID(orderID), Side.BUY, BigDecimal.ZERO, new MSymbol(""), BigDecimal.ZERO, TimeInForce.DAY, null); aMessage.removeField(Side.FIELD); aMessage.removeField(OrderQty.FIELD); aMessage.removeField(Symbol.FIELD); aMessage.removeField(Price.FIELD); aMessage.removeFiel...
Message aMessage = FIXMessageUtil.newLimitOrder(new InternalID( orderID), Side.BUY, BigDecimal.ZERO, new MSymbol(""), BigDecimal.ZERO, TimeInForce.DAY, null); aMessage.removeField(Side.FIELD); aMessage.removeField(OrderQty.FIELD); aMessage.removeField(Symbol.FIELD); aMessage.removeField(Price.FIELD); aMessage.removeFie...
protected void handleSend() { try { String orderID = Application.getIDFactory().getNext(); Message aMessage = FIXMessageUtil.newLimitOrder(new InternalID(orderID), Side.BUY, BigDecimal.ZERO, new MSymbol(""), BigDecimal.ZERO, TimeInForce.DAY, null); aMessage.removeField(Side.FIELD); ...
clear();
protected void handleSend() { try { String orderID = Application.getIDFactory().getNext(); Message aMessage = FIXMessageUtil.newLimitOrder(new InternalID(orderID), Side.BUY, BigDecimal.ZERO, new MSymbol(""), BigDecimal.ZERO, TimeInForce.DAY, null); aMessage.removeField(Side.FIELD); ...
Application.getMainConsoleLogger().error("Error sending order", e);
Application.getMainConsoleLogger().error("Error sending order: "+e.getMessage(), e);
protected void handleSend() { try { String orderID = Application.getIDFactory().getNext(); Message aMessage = FIXMessageUtil.newLimitOrder(new InternalID(orderID), Side.BUY, BigDecimal.ZERO, new MSymbol(""), BigDecimal.ZERO, TimeInForce.DAY, null); aMessage.removeField(Side.FIELD); ...
label = toolkit.createLabel(this, dict.getFieldName(fixFieldNumber)
toolkit.createLabel(this, dict.getFieldName(fixFieldNumber)
public FIXEnumeratedComposite(Composite parent, int style, FormToolkit toolkit, int fixFieldNumber, DataDictionary dict, String[] valuesToDisplay) { super(parent, style, toolkit, fixFieldNumber); this.setLayout(new RowLayout(SWT.HORIZONTAL)); label = toolkit.createLabel(this, dict.getFieldName(fixFieldNumber) ...
int i = 0; for (String string : valuesToDisplay) {
for (int i = 0; i < valuesToDisplay.length; i++) {
public FIXEnumeratedComposite(Composite parent, int style, FormToolkit toolkit, int fixFieldNumber, DataDictionary dict, String[] valuesToDisplay) { super(parent, style, toolkit, fixFieldNumber); this.setLayout(new RowLayout(SWT.HORIZONTAL)); label = toolkit.createLabel(this, dict.getFieldName(fixFieldNumber) ...
i++;
public FIXEnumeratedComposite(Composite parent, int style, FormToolkit toolkit, int fixFieldNumber, DataDictionary dict, String[] valuesToDisplay) { super(parent, style, toolkit, fixFieldNumber); this.setLayout(new RowLayout(SWT.HORIZONTAL)); label = toolkit.createLabel(this, dict.getFieldName(fixFieldNumber) ...
toolkit.createLabel(this, FIXDataDictionaryManager.getHumanFieldName(fixFieldNumber)+": ");
label = toolkit.createLabel(this, FIXDataDictionaryManager.getHumanFieldName(fixFieldNumber)+": ");
public FIXStringComposite(Composite parent, int style, FormToolkit toolkit, int fixFieldNumber) { super(parent, style, toolkit, fixFieldNumber); this.setLayout(new RowLayout(SWT.HORIZONTAL)); toolkit.createLabel(this, FIXDataDictionaryManager.getHumanFieldName(fixFieldNumber)+": "); textField = toolkit.createText(...
if (internalID == null) throw new IllegalArgumentException("ID must not be null");
if (internalID == null) throw new IllegalArgumentException(MessageKey.ERROR_NULL_ID.getLocalizedMessage());
public InternalID(String internalID) { if (internalID == null) throw new IllegalArgumentException("ID must not be null"); mID = internalID; }
} else if (FIXMessageUtil.isCancelRequest(aMessage)) { cancelOneOrder(aMessage);
public void handleInternalMessage(Message aMessage) throws FieldNotFound, MarketceteraException, JMSException { fireOrderActionOccurred(aMessage); if (FIXMessageUtil.isOrderSingle(aMessage)) { addNewOrder(aMessage); } else if (FIXMessageUtil.isCancelRequest(aMessage)) { cancelOneOrder(aMessage); } else if (F...
public ActionDescriptor(IConfigurationElement actionElement, int targetType, Object target) { id = actionElement.getAttribute(ATT_ID); pluginId = actionElement.getDeclaringExtension().getNamespace(); String label = actionElement.getAttribute(ATT_LABEL); String tooltip = actionElement.getAttribute(ATT_TOOLTIP); String ...
public ActionDescriptor(IConfigurationElement actionElement, int targetType) { this(actionElement, targetType, null);
public ActionDescriptor(IConfigurationElement actionElement, int targetType, Object target) { // Load attributes. id = actionElement.getAttribute(ATT_ID); pluginId = actionElement.getDeclaringExtension().getNamespace(); String label = actionElement.getAttribute(ATT_LABEL); ...
throw new NotImplementedException();
return scriptWorkspacePath;
public String getID() { throw new NotImplementedException(); }
throw new NotImplementedException();
return scriptContent;
public String getScript() { throw new NotImplementedException(); }
public RubyIO(Ruby ruby, RubyClass type) {
protected RubyIO(Ruby ruby, RubyClass type) {
public RubyIO(Ruby ruby, RubyClass type) { super(ruby, type); }
public static RubyArray newArray(Ruby runtime, IRubyObject obj) { ArrayList list = new ArrayList(1); list.add(obj); return new RubyArray(runtime, list);
public static final RubyArray newArray(final Ruby runtime, final long len) { return new RubyArray(runtime, new ArrayList((int) len));
public static RubyArray newArray(Ruby runtime, IRubyObject obj) { ArrayList list = new ArrayList(1); list.add(obj); return new RubyArray(runtime, list); }
public RegistryPageContributor(String pageId, IConfigurationElement element, Collection keywordIds) { this(pageId,element); keywordReferences = keywordIds; }
public RegistryPageContributor(String pageId, IConfigurationElement element) { this.pageId = pageId; this.pageElement = element; adaptable = Boolean.valueOf(pageElement.getAttribute(PropertyPagesRegistryReader.ATT_ADAPTABLE)).booleanValue(); }
public RegistryPageContributor(String pageId, IConfigurationElement element, Collection keywordIds) { this(pageId,element); keywordReferences = keywordIds; }
TestSuite suite = new MarketceteraTestSuite(OrderManagementSystemIT.class);
TestSuite suite = new MarketceteraTestSuite(OrderManagementSystemIT.class, OrderManagementSystem.OMS_MESSAGE_BUNDLE_INFO);
public static Test suite() { try { sOMS = new MyOMS(CONFIG_FILE); sOMS.init(); sOMS.run(); } catch (Exception e) { LoggerAdapter.error("Unable to initialize OMS", e, OrderManagementSystemIT.class.getName()); fail("Unable to init OMS"); }...
public static void error(String msg, Throwable ex, Object inCat)
public static void error(String msg, Object inCat)
public static void error(String msg, Throwable ex, Object inCat) { getMyLogger(inCat).log(WRAPPER_FQCN, Level.ERROR, msg, ex); }
getMyLogger(inCat).log(WRAPPER_FQCN, Level.ERROR, msg, ex);
getMyLogger(inCat).log(WRAPPER_FQCN, Level.ERROR, msg, null);
public static void error(String msg, Throwable ex, Object inCat) { getMyLogger(inCat).log(WRAPPER_FQCN, Level.ERROR, msg, ex); }
public MarketceteraTestSuite(Class aClass, String string) { super(aClass, string); init();
public MarketceteraTestSuite() { super(); init(new MessageBundleInfo[]{CORE_BUNDLE});
public MarketceteraTestSuite(Class aClass, String string) { super(aClass, string); init(); }
String connectionFactoryName, boolean explicitDestinationCreation) { mOutgoingQueueSessions = new HashMap<String, QueueSession>(); mOutgoingQueues = new HashMap<String, Queue>(); mOutgoingQueueSenders = new HashMap<String, QueueSender>(); mIncomingQueueSessions = new HashMap<String, QueueSession>(); mIncomingQueues = ...
String connectionFactoryName) { this(initialContextFactoryName, providerURL, connectionFactoryName, false);
public JMSAdapter(String initialContextFactoryName, String providerURL, String connectionFactoryName, boolean explicitDestinationCreation) { mOutgoingQueueSessions = new HashMap<String, QueueSession>(); mOutgoingQueues = new HashMap<String, Queue>(); mOutgoingQueueSenders =...