rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
orderManager.handleCounterpartyMessage(message);
photonController.handleCounterpartyMessage(message);
public void testHandleCounterpartyMessage() throws FieldNotFound { Message message = getTestableExecutionReport(); orderManager.handleCounterpartyMessage(message); EventList<MessageHolder> historyList = messageHistory.getAllMessagesList(); assertEquals(1, historyList.size()); assertEquals(IncomingMessageHolder.cl...
orderManager.handleMessage(aMessage);
photonController.handleMessage(aMessage);
public void testHandleCounterpartyMessages() throws FieldNotFound { Message[] messages = new Message[2]; messages[0] = getTestableExecutionReport(); messages[1] = getTestableExecutionReport(); for (Message aMessage : messages) { orderManager.handleMessage(aMessage); } EventList<MessageHolder> historyList = ...
orderManager.handleInternalMessage(message);
photonController.handleInternalMessage(message);
public void testHandleInternalMessage() throws FieldNotFound, MarketceteraException { Message message = FIXMessageUtil.newLimitOrder(new InternalID("ASDF"), Side.BUY, BigDecimal.ONE, new MSymbol("QWER"), BigDecimal.TEN, TimeInForce.DAY, null); orderManager.handleInternalMessage(message); EventList<MessageHolder> hi...
orderManager.handleMessage(message);
photonController.handleMessage(message);
public void testHandleInternalMessages() throws FieldNotFound { EventList<MessageHolder> historyList = messageHistory.getAllMessagesList(); assertEquals(0, historyList.size()); Message[] messages = new Message[2]; messages[0] = FIXMessageUtil.newLimitOrder(new InternalID("ASDF"), Side.BUY, BigDecimal.ONE, new MSym...
throw new InitializationException("unable to connect incoming queue "+incomingQueueName);
throw new InitializationException(MessageKey.JMS_QUEUE_CONNECT_ERROR.getLocalizedMessage(incomingQueueName));
public void initialize(IStageManager stagemgr, ISystemManager sysmgr, String pluginName) throws Exception { super.initialize(stagemgr, sysmgr, pluginName); OrderManagementSystem oms = OrderManagementSystem.getOMS(); ConfigData props = oms.getInitProps(); String incomingQueueName = props....
throw new InitializationException("unable to connect topic "+outgoingTopicName);
throw new InitializationException(MessageKey.JMS_TOPIC_CONNECT_ERROR.getLocalizedMessage(outgoingTopicName));
public void initialize(IStageManager stagemgr, ISystemManager sysmgr, String pluginName) throws Exception { super.initialize(stagemgr, sysmgr, pluginName); OrderManagementSystem oms = OrderManagementSystem.getOMS(); ConfigData props = oms.getInitProps(); String incomingQueueName = props....
int numRead = bytesMessage.readBytes(buf);
public void initialize(IStageManager stagemgr, ISystemManager sysmgr, String pluginName) throws Exception { super.initialize(stagemgr, sysmgr, pluginName); OrderManagementSystem oms = OrderManagementSystem.getOMS(); ConfigData props = oms.getInitProps(); String incomingQueueName = props....
if (possibleString.startsWith("8=FIX")){
if (possibleString.startsWith(FIX_PREAMBLE)){
public void initialize(IStageManager stagemgr, ISystemManager sysmgr, String pluginName) throws Exception { super.initialize(stagemgr, sysmgr, pluginName); OrderManagementSystem oms = OrderManagementSystem.getOMS(); ConfigData props = oms.getInitProps(); String incomingQueueName = props....
LoggerAdapter.error("Error decoding bytes", ex, this);
LoggerAdapter.error(OMSMessageKey.ERROR_DECODING_MESSAGE.getLocalizedMessage(), ex, this);
public void initialize(IStageManager stagemgr, ISystemManager sysmgr, String pluginName) throws Exception { super.initialize(stagemgr, sysmgr, pluginName); OrderManagementSystem oms = OrderManagementSystem.getOMS(); ConfigData props = oms.getInitProps(); String incomingQueueName = props....
LoggerAdapter.error("error sending QF message on a pipe", ex, this);
LoggerAdapter.error(OMSMessageKey.ERROR_SENDING_QF_MESSAGE.getLocalizedMessage(), ex, this);
public void initialize(IStageManager stagemgr, ISystemManager sysmgr, String pluginName) throws Exception { super.initialize(stagemgr, sysmgr, pluginName); OrderManagementSystem oms = OrderManagementSystem.getOMS(); ConfigData props = oms.getInitProps(); String incomingQueueName = props....
int numRead = bytesMessage.readBytes(buf);
public void onMessage(Message message) { try { quickfix.Message qfMessage = null; if(message instanceof TextMessage) { if(LoggerAdapter.isDebugEnabled(this)) { LoggerAdapter.debug("Received JMS msg: "+mess...
if (possibleString.startsWith("8=FIX")){
if (possibleString.startsWith(FIX_PREAMBLE)){
public void onMessage(Message message) { try { quickfix.Message qfMessage = null; if(message instanceof TextMessage) { if(LoggerAdapter.isDebugEnabled(this)) { LoggerAdapter.debug("Received JMS msg: "+mess...
LoggerAdapter.error("Error decoding bytes", ex, this);
LoggerAdapter.error(OMSMessageKey.ERROR_DECODING_MESSAGE.getLocalizedMessage(), ex, this);
public void onMessage(Message message) { try { quickfix.Message qfMessage = null; if(message instanceof TextMessage) { if(LoggerAdapter.isDebugEnabled(this)) { LoggerAdapter.debug("Received JMS msg: "+mess...
LoggerAdapter.error("error sending QF message on a pipe", ex, this);
LoggerAdapter.error(OMSMessageKey.ERROR_SENDING_QF_MESSAGE.getLocalizedMessage(), ex, this);
public void onMessage(Message message) { try { quickfix.Message qfMessage = null; if(message instanceof TextMessage) { if(LoggerAdapter.isDebugEnabled(this)) { LoggerAdapter.debug("Received JMS msg: "+mess...
new IConsole[] { new MainConsole() });
new IConsole[] { mainConsole }); System.setOut(new PrintStream(mainConsole.getInfoMessageStream(), true)); System.setErr(new PrintStream(mainConsole.getErrorMessageStream(), true));
public void initialize(IWorkbenchConfigurer configurer) { configurer.setSaveAndRestore(true); registerIdeAdapters(); declareIdeWorkbenchImages(); ConsolePlugin.getDefault().getConsoleManager().addConsoles( new IConsole[] { new MainConsole() }); }
LoggerAdapter.info("Starting.", LOGGER_NAME);
LoggerAdapter.info(MessageKey.APP_START.getLocalizedMessage("OMS"), LOGGER_NAME);
public static void main(String [] args) throws ConfigFileLoadingException { String configFile = CONFIG_FILE_NAME; if(args.length == 1) { configFile = args[0]; } sOMS = createOMS(configFile); try { sOMS.init(); LoggerAdapter.info("Starting.", LOG...
LoggerAdapter.error("JMS error", jmse, LOGGER_NAME);
LoggerAdapter.error(MessageKey.JMS_ERROR.getLocalizedMessage(), jmse, LOGGER_NAME);
public static void main(String [] args) throws ConfigFileLoadingException { String configFile = CONFIG_FILE_NAME; if(args.length == 1) { configFile = args[0]; } sOMS = createOMS(configFile); try { sOMS.init(); LoggerAdapter.info("Starting.", LOG...
LoggerAdapter.error("Config error", ce, LOGGER_NAME);
LoggerAdapter.error(MessageKey.CONFIG_ERROR.getLocalizedMessage(), ce, LOGGER_NAME);
public static void main(String [] args) throws ConfigFileLoadingException { String configFile = CONFIG_FILE_NAME; if(args.length == 1) { configFile = args[0]; } sOMS = createOMS(configFile); try { sOMS.init(); LoggerAdapter.info("Starting.", LOG...
LoggerAdapter.error("Config file not found: ", fnf, LOGGER_NAME);
LoggerAdapter.error(MessageKey.CONFIG_FILE_DNE.getLocalizedMessage(), fnf, LOGGER_NAME);
public static void main(String [] args) throws ConfigFileLoadingException { String configFile = CONFIG_FILE_NAME; if(args.length == 1) { configFile = args[0]; } sOMS = createOMS(configFile); try { sOMS.init(); LoggerAdapter.info("Starting.", LOG...
LoggerAdapter.error("Class not found ", cnfe, LOGGER_NAME);
LoggerAdapter.error(MessageKey.CLASS_DNE.getLocalizedMessage(), cnfe, LOGGER_NAME);
public static void main(String [] args) throws ConfigFileLoadingException { String configFile = CONFIG_FILE_NAME; if(args.length == 1) { configFile = args[0]; } sOMS = createOMS(configFile); try { sOMS.init(); LoggerAdapter.info("Starting.", LOG...
LoggerAdapter.error("Error", ex, LOGGER_NAME);
LoggerAdapter.error(MessageKey.ERROR.getLocalizedMessage(), ex, LOGGER_NAME);
public static void main(String [] args) throws ConfigFileLoadingException { String configFile = CONFIG_FILE_NAME; if(args.length == 1) { configFile = args[0]; } sOMS = createOMS(configFile); try { sOMS.init(); LoggerAdapter.info("Starting.", LOG...
LoggerAdapter.info("Exiting application.", LOGGER_NAME);
LoggerAdapter.info(MessageKey.APP_EXIT.getLocalizedMessage(), LOGGER_NAME);
public static void main(String [] args) throws ConfigFileLoadingException { String configFile = CONFIG_FILE_NAME; if(args.length == 1) { configFile = args[0]; } sOMS = createOMS(configFile); try { sOMS.init(); LoggerAdapter.info("Starting.", LOG...
public boolean fireInEventDispathThread() { return false; }
private void init() { checkList = new LinkedList<Member>(); nodeListener = new NodeManagerListener() { public void nodeRemoved(NodeManagerEvent e) { } public void nodeAdded(NodeManagerEvent e) { synchronized (FriendSearcher.th...
FileInfoComparator comp = directoryTable .getDirectoryTableModel().getComparator();
int compType = directoryTable .getDirectoryTableModel().getComparatorType();
private void update0() { Runnable runner = new Runnable() { public void run() { isUpdating = true; Directory dir = directoryTable.getDirectory(); SelectionModel oldSelections = selectionModel; Object[] selections = oldSelections.getSelect...
directoryTable.getDirectoryTableModel().sortBy(comp, false);
directoryTable.getDirectoryTableModel().sortBy(compType, false);
private void update0() { Runnable runner = new Runnable() { public void run() { isUpdating = true; Directory dir = directoryTable.getDirectory(); SelectionModel oldSelections = selectionModel; Object[] selections = oldSelections.getSelect...
FileInfoComparator comp = directoryTable .getDirectoryTableModel().getComparator();
int compType = directoryTable .getDirectoryTableModel().getComparatorType();
public void run() { isUpdating = true; Directory dir = directoryTable.getDirectory(); SelectionModel oldSelections = selectionModel; Object[] selections = oldSelections.getSelections(); FileInfoComparator comp = directoryTable ...
directoryTable.getDirectoryTableModel().sortBy(comp, false);
directoryTable.getDirectoryTableModel().sortBy(compType, false);
public void run() { isUpdating = true; Directory dir = directoryTable.getDirectory(); SelectionModel oldSelections = selectionModel; Object[] selections = oldSelections.getSelections(); FileInfoComparator comp = directoryTable ...
log() .debug("start requesting");
public void run() { long waitTime = getController().getWaitTime() * 4; while (!myThread.isInterrupted()) { log() .debug("start requesting"); FolderInfo[] folders = getController().getFolderRepository() .getJoinedFolderInfo...
if (folder == null) { log().error("PeriodicalRequestor.run folder == null!"); }
public void run() { long waitTime = getController().getWaitTime() * 4; while (!myThread.isInterrupted()) { log() .debug("start requesting"); FolderInfo[] folders = getController().getFolderRepository() .getJoinedFolderInfo...
log().debug("not requesting because no own database");
public void requestMissingFilesForAutodownload(Folder folder) { if (!folder.getSyncProfile().isAutodownload()) { return; } if (logVerbose) { log().verbose("Requesting files (autodownload), has own DB? " + folder.hasOwnDatabase()); } // Dont...
lowerCaseNames.get(fileInfo));
lowerCaseNames.get(fileInfo.getLowerCaseName()));
public static Map<FileInfo, List<FilenameProblem>> tryFindProblems( List<FileInfo> files) { Map<String, FileInfo> lowerCaseNames = new HashMap<String, FileInfo>(); Map<FileInfo, List<FilenameProblem>> returnValue = new HashMap<FileInfo, List<FilenameProblem>>(); for (FileInfo fileInfo...
} else { lowerCaseNames.put(fileInfo.getLowerCaseName(), fileInfo);
public static Map<FileInfo, List<FilenameProblem>> tryFindProblems( List<FileInfo> files) { Map<String, FileInfo> lowerCaseNames = new HashMap<String, FileInfo>(); Map<FileInfo, List<FilenameProblem>> returnValue = new HashMap<FileInfo, List<FilenameProblem>>(); for (FileInfo fileInfo...
String dyndnsHost = (String) mydnsndsModel.getValue(); if (!StringUtils.isBlank(dyndnsHost)) {
String theDyndnsHost = (String) mydnsndsModel.getValue(); if (!StringUtils.isBlank(theDyndnsHost)) {
public void save() { String dyndnsHost = (String) mydnsndsModel.getValue(); if (!StringUtils.isBlank(dyndnsHost)) { ConfigurationEntry.DYNDNS_HOSTNAME.setValue(getController(), dyndnsHost); } else { ConfigurationEntry.DYNDNS_HOSTNAME.removeValue(getControlle...
dyndnsHost);
theDyndnsHost);
public void save() { String dyndnsHost = (String) mydnsndsModel.getValue(); if (!StringUtils.isBlank(dyndnsHost)) { ConfigurationEntry.DYNDNS_HOSTNAME.setValue(getController(), dyndnsHost); } else { ConfigurationEntry.DYNDNS_HOSTNAME.removeValue(getControlle...
if (!StringUtils.isBlank(dyndnsHost)) {
if (!StringUtils.isBlank(theDyndnsHost)) {
public void save() { String dyndnsHost = (String) mydnsndsModel.getValue(); if (!StringUtils.isBlank(dyndnsHost)) { ConfigurationEntry.DYNDNS_HOSTNAME.setValue(getController(), dyndnsHost); } else { ConfigurationEntry.DYNDNS_HOSTNAME.removeValue(getControlle...
String password = new String(dyndnsPasswordField.getPassword()); if (!StringUtils.isBlank(password)) {
String thePassword = new String(dyndnsPasswordField.getPassword()); if (!StringUtils.isBlank(thePassword)) {
public void save() { String dyndnsHost = (String) mydnsndsModel.getValue(); if (!StringUtils.isBlank(dyndnsHost)) { ConfigurationEntry.DYNDNS_HOSTNAME.setValue(getController(), dyndnsHost); } else { ConfigurationEntry.DYNDNS_HOSTNAME.removeValue(getControlle...
password);
thePassword);
public void save() { String dyndnsHost = (String) mydnsndsModel.getValue(); if (!StringUtils.isBlank(dyndnsHost)) { ConfigurationEntry.DYNDNS_HOSTNAME.setValue(getController(), dyndnsHost); } else { ConfigurationEntry.DYNDNS_HOSTNAME.removeValue(getControlle...
folderAtBart.scanLocalFiles(true);
folderAtBart.forceScanOnNextMaintenance(); folderAtBart.maintain();
public void testOverwriteToRecycleAndRestore() { FolderInfo testFolder = new FolderInfo("testFolder", IdGenerator .makeId(), true); joinFolder(testFolder, new File(BASEDIR1), new File(BASEDIR2)); final Folder folderAtBart = getContollerBart().getFolderRepository() .getFold...
setupTestFolder(SyncProfile.MANUAL_DOWNLOAD);
FolderRepository.USE_NEW_SCANNING_CODE = false; setupTestFolder(SyncProfile.PROJECT_WORK);
public void setUp() throws Exception { super.setUp(); setupTestFolder(SyncProfile.MANUAL_DOWNLOAD); folderScanner = new FolderScanner(getController()); folderScanner.start(); }
orderQtyControl.getTextControl().addListener( SWT.KeyUp, new Listener() { public void handleEvent(Event event) { validateForm(); } }); priceControl.getTextControl().addListener( SWT.KeyUp, new Listener() { public void handleEvent(Event event) { validateForm(); } }); validateForm();
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...
validateForm();
protected void handleCancel() { clear(); }
advangedSettingsTab = new AdvancedSettingsTab(getController());
advancedSettingsTab = new AdvancedSettingsTab(getController());
public void initComponents() { mydnsndsModel = new ValueHolder(ConfigurationEntry.DYNDNS_HOSTNAME .getValue(getController())); mydnsndsModel.addValueChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { String dyndns = ...
GeneralSettingsTab.SHOWADVANGEDSETTINGS)))
GeneralSettingsTab.SHOWADVANCEDSETTINGS)))
public void initComponents() { mydnsndsModel = new ValueHolder(ConfigurationEntry.DYNDNS_HOSTNAME .getValue(getController())); mydnsndsModel.addValueChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { String dyndns = ...
preferenceTabs.add(advangedSettingsTab); tabbedPane.addTab(advangedSettingsTab.getTabName(), null, advangedSettingsTab.getUIPanel(), null);
preferenceTabs.add(advancedSettingsTab); tabbedPane.addTab(advancedSettingsTab.getTabName(), null, advancedSettingsTab.getUIPanel(), null);
public void initComponents() { mydnsndsModel = new ValueHolder(ConfigurationEntry.DYNDNS_HOSTNAME .getValue(getController())); mydnsndsModel.addValueChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { String dyndns = ...
showAdvangedTab(Boolean.TRUE.equals(evt.getNewValue()));
showAdvancedTab(Boolean.TRUE.equals(evt.getNewValue()));
public void initComponents() { mydnsndsModel = new ValueHolder(ConfigurationEntry.DYNDNS_HOSTNAME .getValue(getController())); mydnsndsModel.addValueChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { String dyndns = ...
showAdvangedTab(Boolean.TRUE.equals(generalSettingsTab
showAdvancedTab(Boolean.TRUE.equals(generalSettingsTab
public void initComponents() { mydnsndsModel = new ValueHolder(ConfigurationEntry.DYNDNS_HOSTNAME .getValue(getController())); mydnsndsModel.addValueChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { String dyndns = ...
showAdvangedTab(Boolean.TRUE.equals(evt.getNewValue()));
showAdvancedTab(Boolean.TRUE.equals(evt.getNewValue()));
public void propertyChange(PropertyChangeEvent evt) { showAdvangedTab(Boolean.TRUE.equals(evt.getNewValue())); }
File netutil = Util.copyResourceTo(LIBRARY + ".dll", "de/dal33t/powerfolder/util/os/Win32", new File("."), true);
Util.copyResourceTo(LIBRARY + ".dll", "de/dal33t/powerfolder/util/os/Win32", new File("."), true);
public static boolean loadLibrary() { try { File netutil = Util.copyResourceTo(LIBRARY + ".dll", "de/dal33t/powerfolder/util/os/Win32", new File("."), true); // do not test for null here. // because if another Pf client is running the dll cannot be /...
LOG.error(e);
LOG.error("loading library step one failed: " + LIBRARY, e);
public static boolean loadLibrary() { try { File netutil = Util.copyResourceTo(LIBRARY + ".dll", "de/dal33t/powerfolder/util/os/Win32", new File("."), true); // do not test for null here. // because if another Pf client is running the dll cannot be /...
LOG.error(e2);
LOG.error("Loading library failed: " + LIBRARY, e2);
public static boolean loadLibrary() { try { File netutil = Util.copyResourceTo(LIBRARY + ".dll", "de/dal33t/powerfolder/util/os/Win32", new File("."), true); // do not test for null here. // because if another Pf client is running the dll cannot be /...
LoggerAdapter.error("Unable to get database IDs from "+mNextID, ex, this);
LoggerAdapter.error(MessageKey.DB_ID_FETCH.getLocalizedMessage(mNextID), ex, this);
public String getNext() throws NoMoreIDsException { synchronized (this) { if (mNextID >= mUpTo) { try { grabIDs(); } catch (SQLException ex) { LoggerAdapter.error("Unable to get database IDs from "+mNextID, ex, this); ...
silentModeThrottle = new JSlider(); silentModeThrottle.setMajorTickSpacing(25); silentModeThrottle.setMinorTickSpacing(5); silentModeThrottle.setPaintTicks(true); silentModeThrottle.setPaintLabels(true); int smt = 70; try { smt = Integer.parseInt(getController() .getConfig().getProperty("net.silentmodethrottle")); } c...
private void initComponents() { String[] options = new String[3]; options[PRIVATE_MODE_INDEX] = Translation .getTranslation("preferences.dialog.networkmode.private"); options[PUBLIC_MODE_INDEX] = Translation .getTranslation("preferences.dialog.networkmode.public"); ...
getController().getConfig().setProperty("net.silentmodethrottle", Integer.toString(silentModeThrottle.getValue()));
public void save() { Controller.NetworkingMode netMode; switch (networkingMode.getSelectedIndex()) { case 0 : { netMode = NetworkingMode.PRIVATEMODE; break; } case 1 : { netMode = NetworkingMode.PUBLICMODE; br...
return getController().getPreferences().get("uitheme", null);
return PreferencesEntry.UI_COLOUR_THEME.getValueString(getController());
public String getUIThemeConfig() { return getController().getPreferences().get("uitheme", null); }
System.out.println("Got BP header request from mote " + id);
CompassTools.debugPrintln("Got BP header request from mote " + id);
public void messageReceived(int to, Message m) { UnicastPack pack = (UnicastPack) m; int id = pack.get_data_src(); if (id != owner.getID()) return; switch (pack.get_data_type()) { case CompassMote.BIGPACKHEADER: // If true, this is the initial request, else an ACK. if (!busy && pack.get_data_data_bpHeader_p...
System.out.println("BP could not be built for mote " + id + "!");
CompassTools.debugPrintln("BP could not be built for mote " + id + "!");
public void messageReceived(int to, Message m) { UnicastPack pack = (UnicastPack) m; int id = pack.get_data_src(); if (id != owner.getID()) return; switch (pack.get_data_type()) { case CompassMote.BIGPACKHEADER: // If true, this is the initial request, else an ACK. if (!busy && pack.get_data_data_bpHeader_p...
System.out.println("Got BP header ack from mote " + id);
CompassTools.debugPrintln("Got BP header ack from mote " + id);
public void messageReceived(int to, Message m) { UnicastPack pack = (UnicastPack) m; int id = pack.get_data_src(); if (id != owner.getID()) return; switch (pack.get_data_type()) { case CompassMote.BIGPACKHEADER: // If true, this is the initial request, else an ACK. if (!busy && pack.get_data_data_bpHeader_p...
System.out.println("Got BP data ack from mote " + id);
CompassTools.debugPrintln("Got BP data ack from mote " + id);
public void messageReceived(int to, Message m) { UnicastPack pack = (UnicastPack) m; int id = pack.get_data_src(); if (id != owner.getID()) return; switch (pack.get_data_type()) { case CompassMote.BIGPACKHEADER: // If true, this is the initial request, else an ACK. if (!busy && pack.get_data_data_bpHeader_p...
System.out.println("BP sent to mote " + id + " complete");
CompassTools.debugPrintln("BP sent to mote " + id + " complete");
public void messageReceived(int to, Message m) { UnicastPack pack = (UnicastPack) m; int id = pack.get_data_src(); if (id != owner.getID()) return; switch (pack.get_data_type()) { case CompassMote.BIGPACKHEADER: // If true, this is the initial request, else an ACK. if (!busy && pack.get_data_data_bpHeader_p...
System.out.println("Sent BP data (" + (curPackNum + 1) + "/" + numPacks
CompassTools.debugPrintln("Sent BP data (" + (curPackNum + 1) + "/" + numPacks
private void sendData() { UnicastPack pack = new UnicastPack(); pack.set_data_type(BigPack.BIGPACKDATA); pack.set_data_data_bpData_curPack(curPackNum); int firstByte = curPackNum * BigPack.BP_DATA_LEN; int length = BigPack.BP_DATA_LEN; if ((firstByte + length) > stream.length) length = stream.length - firstByt...
System.out.println("Sent BP header (0/" + numPacks + ") to mote "
CompassTools.debugPrintln("Sent BP header (0/" + numPacks + ") to mote "
private void sendHeader() { UnicastPack pack = new UnicastPack(); pack.set_data_type(BigPack.BIGPACKHEADER); pack.set_data_data_bpHeader_requestType(type); pack.set_data_data_bpHeader_packTotal((short) numPacks); pack.set_data_data_bpHeader_byteTotal(stream.length); pack.set_data_data_bpHeader_numBlocks((short) ...
MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Run script", "We're running!");
IScript script = new Script("puts 'sample script output'"); BSFManager manager = new BSFManager(); ScriptRunnable runnable = new ScriptRunnable(script, manager); runnable.run();
public void run(IAction action) { MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Run script", "We're running!"); //agl todo:temp }
this.targetEditor = targetEditor;
public void setActiveEditor(IAction action, IEditorPart targetEditor) { // TODO Auto-generated method stub }
if (na.getMask().sameSubnet(addr, na.getAddress()))
if (na.isValid() && na.getMask().sameSubnet(addr, na.getAddress())) {
public static boolean isOnAnySubnet(Inet4Address addr) { if (localAddresses == null) { NetworkHelper nh = NetworkHelper.getInstance(); if (nh == null) { LOG.verbose("Subnet test not supported on this platform."); return false; } localA...
}
public static boolean isOnAnySubnet(Inet4Address addr) { if (localAddresses == null) { NetworkHelper nh = NetworkHelper.getInstance(); if (nh == null) { LOG.verbose("Subnet test not supported on this platform."); return false; } localA...
port.addEntry(entry);
public void testGetProgress() { Portfolio port = new Portfolio(null, PORTFOLIO_NAME); PositionEntry entry = new PositionEntry(port, "NAME", new InternalID( "1234")); Message aMessage = FIXMessageUtil.newExecutionReport(new InternalID("1234"), new InternalID("456"), "987", ExecTransType.STATUS, ExecType.PARTIA...
long totalSizeUploadingTo = uploadingToSize(upload
long totalPlannedSizeUploadingTo = uploadingToSize(upload
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...
if (totalSizeUploadingTo < 0) { totalSizeUploadingTo = 0;
if (totalPlannedSizeUploadingTo < 0) { totalPlannedSizeUploadingTo = 0;
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...
totalSizeUploadingTo += plannedSizeUploadingTo
totalPlannedSizeUploadingTo += plannedSizeUploadingTo
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...
if (totalSizeUploadingTo <= 5 * 1024 * 1024) { if (totalSizeUploadingTo >= 0) {
if (totalPlannedSizeUploadingTo <= 5 * 1024 * 1024) { if (totalPlannedSizeUploadingTo >= 0) {
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...
.formatBytesShort(totalSizeUploadingTo));
.formatBytesShort(totalPlannedSizeUploadingTo));
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...
suite.addTestSuite(LexerTest.class); suite.addTestSuite(ScriptRegistryTest.class);
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(StockOrderTicketViewTest.class); suite.addTestSuite(FIXMessagesViewTest.class); suite.addTestSuite(FillsViewTest.class); suite.addTestSuite(AveragePricesViewTest.class); suite.addTestSuite(ParserTest.class); return suite; }
Object target = getUIController().getInformationQuarter()
Object displayTarget = getUIController().getInformationQuarter()
public void selectionChanged(SelectionChangeEvent event) { Object[] selections = getSelectionModel().getSelections(); Object target = getUIController().getInformationQuarter() .getDisplayTarget(); final Folder folder; if (target instanceof Directory) { ...
if (target instanceof Directory) { folder = ((Directory) target).getRootFolder(); } else if (target instanceof Folder) { folder = (Folder) target; } else { log().warn( "Unable to mark file for auto download files on target: " + target);
if (displayTarget instanceof Directory) { folder = ((Directory) displayTarget).getRootFolder(); } else if (displayTarget instanceof Folder) { folder = (Folder) displayTarget; } else {
public void selectionChanged(SelectionChangeEvent event) { Object[] selections = getSelectionModel().getSelections(); Object target = getUIController().getInformationQuarter() .getDisplayTarget(); final Folder folder; if (target instanceof Directory) { ...
File debugFile = new File("debug/" + targetFolder.getName()
File debugFile = new File(Logger.getDebugDir(), targetFolder.getName()
public void handleMessage(Message message) { if (message == null) { throw new NullPointerException( "Unable to handle message, message is null"); } // related folder is filled if message is a folder related message FolderInfo targetedFolderInfo = null; Fo...
RequestNodeList request = getController().getNodeManager() .createDefaultNodeListRequestMessage();
boolean thisHandshakeCompleted = true;
public boolean completeHandshake() { if (!isConnected()) { return false; } // Create request for nodelist. RequestNodeList request = getController().getNodeManager() .createDefaultNodeListRequestMessage(); synchronized (peerInitalizeLock) { if (!is...
peer.sendMessageAsynchron(request, null);
public boolean completeHandshake() { if (!isConnected()) { return false; } // Create request for nodelist. RequestNodeList request = getController().getNodeManager() .createDefaultNodeListRequestMessage(); synchronized (peerInitalizeLock) { if (!is...
handshaked = false;
thisHandshakeCompleted = false; } else { peer.sendMessageAsynchron(request, null);
public boolean completeHandshake() { if (!isConnected()) { return false; } // Create request for nodelist. RequestNodeList request = getController().getNodeManager() .createDefaultNodeListRequestMessage(); synchronized (peerInitalizeLock) { if (!is...
handshaked = isConnected();
handshaked = thisHandshakeCompleted && isConnected();
public boolean completeHandshake() { if (!isConnected()) { return false; } // Create request for nodelist. RequestNodeList request = getController().getNodeManager() .createDefaultNodeListRequestMessage(); synchronized (peerInitalizeLock) { if (!is...
TestHelper.waitMilliSeconds(500);
TestHelper.waitMilliSeconds(10000);
public void testAbortUpload() { assertEquals(0, bartModelListener.events.size()); // Create a 20 megs file TestHelper.createRandomFile(getFolderAtBart().getLocalBase(), 20000000); getFolderAtBart().forceScanOnNextMaintenance(); getFolderAtBart().maintain(); TestHelper.waitF...
InternalID orderID = new InternalID(""+0);
public Command cancelAllCommand() throws ParserException { consumeToken("Expected cancel all command.", null); InternalID orderID = new InternalID(""+0); Message message = new quickfix.fix42.Message(); message.getHeader().setField(new MsgType(MsgType.ORDER_CANCEL_REQUEST)); Lis...
return value.equals(matcherValue.toString());
boolean returnValue = shouldInclude ^ value.equals(matcherValue.toString()); return returnValue;
public boolean matches(MessageHolder item) { try { Message aMessage = item.getMessage(); if (matcherValue == null){ try { String value = getFieldValueString(aMessage, matcherFIXField); return (value == null); } catch (FieldNotFound ex){ return true; } } else { String value = getFieldVal...
TransactTime ttField = new TransactTime(new Date(10000000)); TransactTime ttFieldLater = new TransactTime(new Date(10010000));
SendingTime stField = new SendingTime(new Date(10000000)); SendingTime stFieldLater = new SendingTime(new Date(10010000));
public void testExecutionReportOrder() throws FieldNotFound { InternalID orderID1 = new InternalID("1"); InternalID clOrderID1 = new InternalID("2"); String execID = "3"; char execTransType = ExecTransType.STATUS; char execType = ExecType.PARTIAL_FILL; char ordStatus = OrdStatus.PARTIALLY_FILLED; char side = Si...
message1.setField(ttField);
message1.getHeader().setField(stField);
public void testExecutionReportOrder() throws FieldNotFound { InternalID orderID1 = new InternalID("1"); InternalID clOrderID1 = new InternalID("2"); String execID = "3"; char execTransType = ExecTransType.STATUS; char execType = ExecType.PARTIAL_FILL; char ordStatus = OrdStatus.PARTIALLY_FILLED; char side = Si...
message2.setField(ttField);
message2.getHeader().setField(stField);
public void testExecutionReportOrder() throws FieldNotFound { InternalID orderID1 = new InternalID("1"); InternalID clOrderID1 = new InternalID("2"); String execID = "3"; char execTransType = ExecTransType.STATUS; char execType = ExecType.PARTIAL_FILL; char ordStatus = OrdStatus.PARTIALLY_FILLED; char side = Si...
message3.setField(ttFieldLater);
message3.getHeader().setField(stFieldLater);
public void testExecutionReportOrder() throws FieldNotFound { InternalID orderID1 = new InternalID("1"); InternalID clOrderID1 = new InternalID("2"); String execID = "3"; char execTransType = ExecTransType.STATUS; char execType = ExecType.PARTIAL_FILL; char ordStatus = OrdStatus.PARTIALLY_FILLED; char side = Si...
assertEquals(new BigDecimal(100), new BigDecimal(history.getLatestExecutionReport(clOrderID1.toString()).getString(LastQty.FIELD))); assertTrue(!history.getLatestExecutionReport(clOrderID1.toString()).isSetField(OrderID.FIELD));
assertEquals(new BigDecimal(200), new BigDecimal(history.getLatestExecutionReport(clOrderID1.toString()).getString(LastQty.FIELD))); assertTrue(history.getLatestExecutionReport(clOrderID1.toString()).isSetField(OrderID.FIELD));
public void testExecutionReportOrder() throws FieldNotFound { InternalID orderID1 = new InternalID("1"); InternalID clOrderID1 = new InternalID("2"); String execID = "3"; char execTransType = ExecTransType.STATUS; char execType = ExecType.PARTIAL_FILL; char ordStatus = OrdStatus.PARTIALLY_FILLED; char side = Si...
executionReportForOrder1.setField(new TransactTime(new Date(System.currentTimeMillis() - 10000)));
executionReportForOrder1.getHeader().setField(new SendingTime(new Date(currentTime - 10000)));
public void testGetLatestExecutionReports() throws FieldNotFound { FIXMessageHistory history = getMessageHistory(); Message order1 = FIXMessageUtil.newMarketOrder(new InternalID("1"), Side.BUY, new BigDecimal(1000), new MSymbol("ASDF"), TimeInForce.FILL_OR_KILL, new AccountID("ACCT")); Message executionReportForOrd...
executionReportForOrder1.setField(new TransactTime(new Date(System.currentTimeMillis() - 8000)));
executionReportForOrder2.getHeader().setField(new SendingTime(new Date(currentTime - 8000)));
public void testGetLatestExecutionReports() throws FieldNotFound { FIXMessageHistory history = getMessageHistory(); Message order1 = FIXMessageUtil.newMarketOrder(new InternalID("1"), Side.BUY, new BigDecimal(1000), new MSymbol("ASDF"), TimeInForce.FILL_OR_KILL, new AccountID("ACCT")); Message executionReportForOrd...
executionReportForOrder1.setField(new TransactTime(new Date(System.currentTimeMillis() - 7000)));
secondExecutionReportForOrder1.getHeader().setField(new SendingTime(new Date(currentTime - 7000)));
public void testGetLatestExecutionReports() throws FieldNotFound { FIXMessageHistory history = getMessageHistory(); Message order1 = FIXMessageUtil.newMarketOrder(new InternalID("1"), Side.BUY, new BigDecimal(1000), new MSymbol("ASDF"), TimeInForce.FILL_OR_KILL, new AccountID("ACCT")); Message executionReportForOrd...
folder1.setSyncProfile(SyncProfile.SYNCHRONIZE_PCS); folder2.setSyncProfile(SyncProfile.MANUAL_DOWNLOAD); RecycleBin recycleBin = getContoller2().getRecycleBin(); List<FileInfo> deletedFiles = getContoller2().getRecycleBin() .getAllRecycledFiles(); for (FileInfo deletedFileInfo : deletedFiles) { recycleBin.restoreFrom...
public void testDeletionSync() throws IOException, InterruptedException { // file "host" and "client" folder1.setSyncProfile(SyncProfile.MANUAL_DOWNLOAD); folder2.setSyncProfile(SyncProfile.SYNCHRONIZE_PCS); File file1 = createTestFile(folder1, "/TestFile.txt", "This are the c...
LoggerAdapter.error("Could not find exchange for " + marketIdentifierCode, this);
LoggerAdapter.error(MessageKey.ERROR_EXCHANGE_DNE.getLocalizedMessage(marketIdentifierCode), this);
private void init(Properties props) { Map<String, Exchange> map = new HashMap<String, Exchange>(); for (Object o : props.keySet()) { String key = (String) o; String marketIdentifierCode = (String) props.get(key); Exchange exch = Exchanges.getExchange(marketIdentifierCo...
boolean timeout = TestHelper.waitForCondition(200, new Condition() {
boolean succes = TestHelper.waitForCondition(200, new Condition() {
private void scanFolder() { scanned = false; getFolder().forceScanOnNextMaintenance(); getController().getFolderRepository().triggerMaintenance(); boolean timeout = TestHelper.waitForCondition(200, new Condition() { public boolean reached() { return scanned; ...
assertFalse("Folder was not scanned as requested", timeout);
assertTrue("Folder was not scanned as requested", succes);
private void scanFolder() { scanned = false; getFolder().forceScanOnNextMaintenance(); getController().getFolderRepository().triggerMaintenance(); boolean timeout = TestHelper.waitForCondition(200, new Condition() { public boolean reached() { return scanned; ...
WaveletConfigServer.debugPrint("Payload: ");
CompassTools.debugPrint("Payload: ");
private void debugMsg(Message msg) { WaveletConfigServer.debugPrint("Payload: "); for (int i = 0; i < msg.dataLength(); i++) { WaveletConfigServer.debugPrint(Integer.toHexString(msg.dataGet()[i] & 0xff) + " "); } WaveletConfigServer.debugPrintln(); }
WaveletConfigServer.debugPrint(Integer.toHexString(msg.dataGet()[i] & 0xff)
CompassTools.debugPrint(Integer.toHexString(msg.dataGet()[i] & 0xff)
private void debugMsg(Message msg) { WaveletConfigServer.debugPrint("Payload: "); for (int i = 0; i < msg.dataLength(); i++) { WaveletConfigServer.debugPrint(Integer.toHexString(msg.dataGet()[i] & 0xff) + " "); } WaveletConfigServer.debugPrintln(); }
WaveletConfigServer.debugPrintln();
CompassTools.debugPrintln();
private void debugMsg(Message msg) { WaveletConfigServer.debugPrint("Payload: "); for (int i = 0; i < msg.dataLength(); i++) { WaveletConfigServer.debugPrint(Integer.toHexString(msg.dataGet()[i] & 0xff) + " "); } WaveletConfigServer.debugPrintln(); }
FilenameProblemDialog dialog = new FilenameProblemDialog( getController(), true, fileNameProblemEvent.getScanResult()); dialog.open();
final FilenameProblemDialog dialog = new FilenameProblemDialog( getController(), fileNameProblemEvent.getScanResult()); Runnable runner = new Runnable() { public void run() { dialog.open(); } }; UIUtil.invokeLaterInEDT(runner);
public void fileNameProblemsDetected( FileNameProblemEvent fileNameProblemEvent) { log().debug( "****************** " + fileNameProblemEvent.getFolder() + " " + fileNameProblemEvent.getScanResult().getProblemFiles()); FilenameProblemDialog dialog = new FilenameProbl...
.getTranslation("foldercreate.error.unable_tocreate",
.getTranslation("foldercreate.error.unable_to_create",
private void checkBaseDir(File baseDir) throws FolderException { // Basic checks if (!localBase.exists()) { if (!localBase.mkdirs()) { throw new FolderException(getInfo(), Translation .getTranslation("foldercreate.error.unable_tocreate", ...
mPreferences = new ScopedPreferenceStore(new ConfigurationScope(), Application.PLUGIN_ID); setPreferenceStore(mPreferences);
preferences = new ScopedPreferenceStore(new ConfigurationScope(), Application.PLUGIN_ID); setPreferenceStore(preferences);
public JMSPreferencePage() { super(GRID); mPreferences = new ScopedPreferenceStore(new ConfigurationScope(), Application.PLUGIN_ID); setPreferenceStore(mPreferences); }