bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public long getDtime() { return Ext2Utils.get32(data, 20); }
|
public synchronized long getDtime() { return Ext2Utils.get32(data, 20); }
| 8,481
|
public long getFAddr() { return Ext2Utils.get32(data, 112); }
|
public synchronized long getFAddr() { return Ext2Utils.get32(data, 112); }
| 8,482
|
public long getFileACL() { return Ext2Utils.get32(data, 104); }
|
public synchronized long getFileACL() { return Ext2Utils.get32(data, 104); }
| 8,483
|
public long getFlags() { return Ext2Utils.get32(data, 32); }
|
public synchronized long getFlags() { return Ext2Utils.get32(data, 32); }
| 8,484
|
public long getGeneration() { return Ext2Utils.get32(data, 100); }
|
public synchronized long getGeneration() { return Ext2Utils.get32(data, 100); }
| 8,485
|
public int getGid() { return Ext2Utils.get16(data, 24); }
|
public synchronized int getGid() { return Ext2Utils.get16(data, 24); }
| 8,486
|
public int getLinksCount() { return Ext2Utils.get16(data, 26); }
|
public synchronized int getLinksCount() { return Ext2Utils.get16(data, 26); }
| 8,487
|
public int getMode() { int iMode=Ext2Utils.get16(data, 0); //log.debug("INode.getIMode(): "+Ext2Print.hexFormat(iMode)); return iMode; }
|
public synchronized int getMode() { int iMode=Ext2Utils.get16(data, 0); //log.debug("INode.getIMode(): "+Ext2Print.hexFormat(iMode)); return iMode; }
| 8,488
|
public long getMtime() { return Ext2Utils.get32(data, 16); }
|
public synchronized long getMtime() { return Ext2Utils.get32(data, 16); }
| 8,489
|
public long getOSD1() { return Ext2Utils.get32(data, 36); }
|
public synchronized long getOSD1() { return Ext2Utils.get32(data, 36); }
| 8,490
|
public long getSize() { return Ext2Utils.get32(data, 4); }
|
public synchronized long getSize() { return Ext2Utils.get32(data, 4); }
| 8,491
|
public int getUid() { return Ext2Utils.get16(data, 2); }
|
public synchronized int getUid() { return Ext2Utils.get16(data, 2); }
| 8,492
|
public void setAtime(long atime) { Ext2Utils.set32(data, 8, atime); setDirty(true); }
|
public synchronized void setAtime(long atime) { Ext2Utils.set32(data, 8, atime); setDirty(true); }
| 8,493
|
public void setBlocks(long count) { log.debug("setBlocks("+count+")"); Ext2Utils.set32(data, 28, count); setDirty(true); }
|
public synchronized void setBlocks(long count) { log.debug("setBlocks("+count+")"); Ext2Utils.set32(data, 28, count); setDirty(true); }
| 8,494
|
public void setCtime(long ctime) { Ext2Utils.set32(data, 12, ctime); setDirty(true); }
|
public synchronized void setCtime(long ctime) { Ext2Utils.set32(data, 12, ctime); setDirty(true); }
| 8,495
|
public void setDirACL(long acl) { Ext2Utils.set32(data, 108, acl); setDirty(true); }
|
public synchronized void setDirACL(long acl) { Ext2Utils.set32(data, 108, acl); setDirty(true); }
| 8,496
|
public void setDtime(long dtime) { Ext2Utils.set32(data, 20, dtime); setDirty(true); }
|
public synchronized void setDtime(long dtime) { Ext2Utils.set32(data, 20, dtime); setDirty(true); }
| 8,497
|
public void setFAddr(long faddr) { Ext2Utils.set32(data, 112, faddr); setDirty(true); }
|
public synchronized void setFAddr(long faddr) { Ext2Utils.set32(data, 112, faddr); setDirty(true); }
| 8,498
|
public void setFileACL(long acl) { Ext2Utils.set32(data, 104, acl); setDirty(true); }
|
public synchronized void setFileACL(long acl) { Ext2Utils.set32(data, 104, acl); setDirty(true); }
| 8,499
|
public void setFlags(long flags) { Ext2Utils.set32(data, 32, flags); setDirty(true); }
|
public synchronized void setFlags(long flags) { Ext2Utils.set32(data, 32, flags); setDirty(true); }
| 8,500
|
public void setGeneration(long gen) { Ext2Utils.set32(data, 100, gen); setDirty(true); }
|
public synchronized void setGeneration(long gen) { Ext2Utils.set32(data, 100, gen); setDirty(true); }
| 8,501
|
public void setGid(int gid) { Ext2Utils.set16(data, 24, gid); setDirty(true); }
|
public synchronized void setGid(int gid) { Ext2Utils.set16(data, 24, gid); setDirty(true); }
| 8,502
|
public void setLinksCount(int lc) { Ext2Utils.set16(data, 26, lc); setDirty(true); }
|
public synchronized void setLinksCount(int lc) { Ext2Utils.set16(data, 26, lc); setDirty(true); }
| 8,503
|
public void setMode(int imode) { Ext2Utils.set16(data, 0, imode); setDirty(true); }
|
public synchronized void setMode(int imode) { Ext2Utils.set16(data, 0, imode); setDirty(true); }
| 8,504
|
public void setMtime(long mtime) { Ext2Utils.set32(data, 16, mtime); setDirty(true); }
|
public synchronized void setMtime(long mtime) { Ext2Utils.set32(data, 16, mtime); setDirty(true); }
| 8,505
|
public void setOSD1(long osd1) { Ext2Utils.set32(data, 36, osd1); setDirty(true); }
|
public synchronized void setOSD1(long osd1) { Ext2Utils.set32(data, 36, osd1); setDirty(true); }
| 8,506
|
public void setSize(long size) { Ext2Utils.set32(data, 4, size); setDirty(true); }
|
public synchronized void setSize(long size) { Ext2Utils.set32(data, 4, size); setDirty(true); }
| 8,507
|
public void setUid(int uid) { Ext2Utils.set16(data, 2, uid); setDirty(true); }
|
public synchronized void setUid(int uid) { Ext2Utils.set16(data, 2, uid); setDirty(true); }
| 8,508
|
public Color brighter() { // Do not inline getRGB() to this.value, because of SystemColor. int value = getRGB(); int red = (value & RED_MASK) >> 16; int green = (value & GREEN_MASK) >> 8; int blue = value & BLUE_MASK; // We have to special case 0-2 because they won't scale by division. red = red < 3 ? 3 : (int) Math.min(255, red / BRIGHT_SCALE); green = green < 3 ? 3 : (int) Math.min(255, green / BRIGHT_SCALE); blue = blue < 3 ? 3 : (int) Math.min(255, blue / BRIGHT_SCALE); return new Color(red, green, blue, 255); }
|
public Color brighter() { // Do not inline getRGB() to this.value, because of SystemColor. int value = getRGB(); int red = (value & RED_MASK) >> 16; int green = (value & GREEN_MASK) >> 8; int blue = value & BLUE_MASK; // We have to special case 0-2 because they won't scale by division. red = red < 3 ? 3 : (int) Math.min(255, red / BRIGHT_SCALE); green = green < 3 ? 3 : (int) Math.min(255, green / BRIGHT_SCALE); blue = blue < 3 ? 3 : (int) Math.min(255, blue / BRIGHT_SCALE); return new Color(red, green, blue, 255); }
| 8,509
|
public VolumeDescriptor( ISO9660Volume volume, byte[] buffer) throws IOException { this.volume = volume; init(buffer); }
|
public VolumeDescriptor( ISO9660Volume volume, byte[] buffer) throws IOException { this.volume = volume; init(buffer); }
| 8,511
|
public int getNumberOfLB() { return numberOfLB; }
|
public int getNumberOfLB() { return numberOfLB; }
| 8,512
|
public void printOut() { System.out.println("Primary volume information: "); System.out.println(" - Standard Identifier: " + this.getStandardIdentifier()); System.out.println(" - System Identifier: " + this.getSystemIdentifier()); System.out.println(" - Volume Identifier: " + this.getVolumeIdentifier()); System.out.println(" - Volume set Identifier: " + this.getVolumeSetIdentifier()); System.out.println(" - Volume set size: " + this.getVolumeSetSize()); System.out.println(" - Number of LBs: " + this.getNumberOfLB()); System.out.println(" - Size of LBs: " + this.getLBSize()); System.out.println(" - PathTable size: " + this.getPathTableSize()); System.out.println(" - Location of L PathTable : " + this.getLocationOfTyp_L_PathTable()); System.out.println(" - Location of Optional L PathTable : " + this.getLocationOfOptionalTyp_L_PathTable()); System.out.println(" - Location of M PathTable : " + this.getLocationOfTyp_M_PathTable()); System.out.println(" - Location of Optional M PathTable : " + this.getLocationOfOptionalTyp_M_PathTable()); System.out.println(" - Root directory entry: " ); System.out.println(" - Size: " + this.getRootDirectoryEntry().getLengthOfDirectoryEntry()); System.out.println(" - Extended attribute size: " + this.getRootDirectoryEntry().getLengthOfExtendedAttribute()); System.out.println(" - Location of the extent: " + this.getRootDirectoryEntry().getLocationOfExtent()); System.out.println(" - Length of the file identifier: " + this.getRootDirectoryEntry().getLengthOfFileIdentifier()); System.out.println(" - is directory: " + this.getRootDirectoryEntry().isDirectory()); System.out.println(" - File identifier: " + this.getRootDirectoryEntry().getFileIdentifier()); System.out.println(" - Data Length: " + this.getRootDirectoryEntry().getDataLength()); System.out.println(" - File unit size: " + this.getRootDirectoryEntry().getFileUnitSize()); }
|
public void printOut() { System.out.println("Primary volume information: "); System.out.println(" - Standard Identifier: " + this.getStandardIdentifier()); System.out.println(" - System Identifier: " + this.getSystemIdentifier()); System.out.println(" - Volume Identifier: " + this.getVolumeIdentifier()); System.out.println(" - Volume set Identifier: " + this.getVolumeSetIdentifier()); System.out.println(" - Volume set size: " + this.getVolumeSetSize()); System.out.println(" - Number of LBs: " + this.getNumberOfLB()); System.out.println(" - Size of LBs: " + this.getLBSize()); System.out.println(" - PathTable size: " + this.getPathTableSize()); System.out.println(" - Location of L PathTable : " + this.getLocationOfTyp_L_PathTable()); System.out.println(" - Location of Optional L PathTable : " + this.getLocationOfOptionalTyp_L_PathTable()); System.out.println(" - Location of M PathTable : " + this.getLocationOfTyp_M_PathTable()); System.out.println(" - Location of Optional M PathTable : " + this.getLocationOfOptionalTyp_M_PathTable()); System.out.println(" - Root directory entry: " ); System.out.println(" - Size: " + this.getRootDirectoryEntry().getLengthOfDirectoryEntry()); System.out.println(" - Extended attribute size: " + this.getRootDirectoryEntry().getLengthOfExtendedAttribute()); System.out.println(" - Location of the extent: " + this.getRootDirectoryEntry().getLocationOfExtent()); System.out.println(" - Length of the file identifier: " + this.getRootDirectoryEntry().getLengthOfFileIdentifier()); System.out.println(" - is directory: " + this.getRootDirectoryEntry().isDirectory()); System.out.println(" - File identifier: " + this.getRootDirectoryEntry().getFileIdentifier()); System.out.println(" - Data Length: " + this.getRootDirectoryEntry().getDataLength()); System.out.println(" - File unit size: " + this.getRootDirectoryEntry().getFileUnitSize()); }
| 8,513
|
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); popup.show(me.getComponent(), me.getX(),me.getY()); }
|
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); popup.show(me.getComponent(), me.getX(),me.getY()); }
| 8,514
|
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); popup.show(me.getComponent(), me.getX(),me.getY()); }
|
private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getRowColFromPoint(me.getX(),me.getY()) - (screen.getCols()-1); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_COPY); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { rubberband.getBoundingArea(workR); // get the width and height int ePos = screen.getRowColFromPoint(workR.width , workR.height ); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + screen.getCol(ePos)); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + screen.getRow(ePos)); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (recording) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); popup.show(me.getComponent(), me.getX(),me.getY()); }
| 8,515
|
EmitterContext(AbstractX86Stream os, X86CompilerHelper helper, VirtualStack vstack, X86RegisterPool pool) { this.os = os; this.helper = helper; this.vstack = vstack; this.pool = pool; }
|
EmitterContext(AbstractX86Stream os, X86CompilerHelper helper, VirtualStack vstack, X86RegisterPool pool, ItemFactory ifac) { this.os = os; this.helper = helper; this.vstack = vstack; this.pool = pool; }
| 8,518
|
X86CompilerHelper getHelper() { return helper; }
|
final X86CompilerHelper getHelper() { return helper; }
| 8,520
|
X86RegisterPool getPool() { return pool; }
|
final X86RegisterPool getPool() { return pool; }
| 8,521
|
AbstractX86Stream getStream() { return os; }
|
final AbstractX86Stream getStream() { return os; }
| 8,522
|
VirtualStack getVStack() { return vstack; }
|
final VirtualStack getVStack() { return vstack; }
| 8,523
|
public void startProduction(ImageConsumer ic) { if (! (consumers.contains(ic))) consumers.addElement(ic); Vector list = (Vector) consumers.clone(); for (int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture(ic); if (animated) ic.imageComplete(ImageConsumer.SINGLEFRAME); else ic.imageComplete(ImageConsumer.STATICIMAGEDONE); } }
|
public void startProduction(ImageConsumer ic) { if (! (consumers.contains(ic))) consumers.addElement(ic); Vector list = (Vector) consumers.clone(); for (int i = 0; i < list.size(); i++) { ic = (ImageConsumer) list.elementAt(i); sendPicture(ic); if (animated) ic.imageComplete(ImageConsumer.SINGLEFRAMEDONE); else ic.imageComplete(ImageConsumer.STATICIMAGEDONE); } }
| 8,525
|
public static AlreadyBound extract(Any a) { try { return ((AlreadyBoundHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION(); } }
|
public static AlreadyBound extract(Any a) { try { return ((AlreadyBoundHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { BAD_OPERATION bad = new BAD_OPERATION(); bad.initCause(ex); bad.minor = Minor.Any; throw bad; } }
| 8,526
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // for node sets the iteration order for how we will setData // in the datacube (important for delimited and formatted reads). int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); if (name.equals("axisIdRef") ) { AxisReadOrder.add(AxisObj.get(attrs.getValue(i))); } else Log.warnln("Warning: got weird attribute:"+name+" on for node"); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // for node sets the iteration order for how we will setData // in the datacube (important for delimited and formatted reads). int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); if (name.equals("axisIdRef") ) { AxisReadOrder.add(0, AxisObj.get(attrs.getValue(i))); } else Log.warnln("Warning: got weird attribute:"+name+" on for node"); } return (Object) null; }
| 8,528
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = (Parameter) CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
| 8,529
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = (Parameter) CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
| 8,530
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = (Parameter) ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
| 8,531
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // grab parent node name String parentNodeName = getParentNodeName(); // create new object appropriately Parameter newparameter = new Parameter(); newparameter.setXMLAttributes(attrs); // set XML attributes from passed list // add this object to the lookup table, if it has an ID String paramId = newparameter.getParamId(); if (paramId != null) { // a warning check, just in case if (ParamObj.containsKey(paramId)) Log.warnln("More than one param node with paramId=\""+paramId+"\", using latest node." ); // add this into the list of param objects ParamObj.put(paramId, newparameter); } // If there is a reference object, clone it to get // the new param String paramIdRef = newparameter.getParamIdRef(); if (paramIdRef != null) { if (ParamObj.containsKey(paramIdRef)) { Parameter refParamObj = (Parameter) ParamObj.get(paramIdRef); try { newparameter = (Parameter) refParamObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone param object. Aborting read."); System.exit(-1); } // override attrs with those in passed list newparameter.setXMLAttributes(attrs); // give the clone a unique Id and remove IdRef newparameter.setParamId(findUniqueIdName(ParamObj,newparameter.getParamId())); newparameter.setParamIdRef(null); // add this into the list of param objects ParamObj.put(newparameter.getParamId(), newparameter); } else { Log.warnln("Error: Reader got an param with ParamIdRef=\""+paramIdRef+"\" but no previous param has that id! Ignoring add param request."); return (Object) null; } } // determine where this goes and then insert it if( parentNodeName.equals(XDFNodeName.ARRAY) ) { newparameter = CurrentArray.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.ROOT) || parentNodeName.equals(XDFNodeName.STRUCTURE) ) { newparameter = CurrentStructure.addParameter(newparameter); } else if ( parentNodeName.equals(XDFNodeName.PARAMETERGROUP) ) { // for now, just add as regular parameter if(LastParameterGroupParentObject instanceof Array) { newparameter = ((Array) LastParameterGroupParentObject).addParameter(newparameter); } else if(LastParameterGroupParentObject instanceof Structure) { newparameter = (Parameter) ((Structure) LastParameterGroupParentObject).addParameter(newparameter); } } else { Log.warnln("Error: weird parent node "+parentNodeName+" for parameter, ignoring"); return (Object) null; } // add this object to all open groups Iterator iter = CurrentParameterGroupList.iterator(); while (iter.hasNext()) { ParameterGroup nextParamGroupObj = (ParameterGroup) iter.next(); newparameter.addToGroup(nextParamGroupObj); } LastParameterObject = newparameter; return newparameter; }
| 8,532
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // The root node is just a "structure" node, // but is always the first one. XDF.setXMLAttributes(attrs); // set XML attributes from passed list CurrentStructure = XDF; // current working structure is now the root // structure // if this global option is set in the reader, we use it if(Options.contains("DefaultDataDimensionSize")) { int value = ((Integer) Options.get("DefaultDataDimensionSize")).intValue(); Specification.getInstance().setDefaultDataArraySize(value); } return CurrentStructure; }
|
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // The root node is just a "structure" node, // but is always the first one. XDF.setXMLAttributes(attrs); // set XML attributes from passed list setCurrentStructure(XDF); // current working structure is now the root // structure // if this global option is set in the reader, we use it if(Options.contains("DefaultDataDimensionSize")) { int value = ((Integer) Options.get("DefaultDataDimensionSize")).intValue(); Specification.getInstance().setDefaultDataArraySize(value); } return CurrentStructure; }
| 8,533
|
private Array appendArrayToArray (Array arrayToAppendTo, Array arrayToAdd) { if (arrayToAppendTo != null) { List origAxisList = arrayToAppendTo.getAxes(); List addAxisList = arrayToAdd.getAxes(); Hashtable correspondingAddAxis = new Hashtable(); Hashtable correspondingOrigAxis = new Hashtable(); // 1. determine the proper alignment of the axes between both arrays // Then cross-reference each in lookup Hashtables. Iterator iter = origAxisList.iterator(); while (iter.hasNext()) { AxisInterface origAxis = (AxisInterface) iter.next(); String align = origAxis.getAlign(); // search the list of the other array for a matching axis boolean gotAMatch = false; Iterator iter2 = addAxisList.iterator(); while (iter2.hasNext()) { AxisInterface addAxis = (AxisInterface) iter2.next(); String thisAlign = addAxis.getAlign(); if(thisAlign != null) { if(thisAlign.equals(align)) { correspondingAddAxis.put(origAxis.getAxisId(), addAxis); correspondingOrigAxis.put(addAxis.getAxisId(), origAxis); gotAMatch = true; break; } } else { Log.errorln("Cant align axes, axis missing defined align attribute. Aborting."); return arrayToAppendTo; } } // no match?? then alignments are mis-specified. if (!gotAMatch) { Log.errorln("Cant align axes, axis has align attribute that is mis-specified. Aborting."); return arrayToAppendTo; } } // 2. "Append" axis values to original axis. Because // there are 2 different ways to add in data we either // have a pre-existing axis value, in which case we dont // need to expand the existing axis, or there is no pre-existing // value so we tack it in. We need to figure out here if an // axis value already exists, and if it doesnt then we add it in. // Iterator iter3 = origAxisList.iterator(); while (iter3.hasNext()) { AxisInterface origAxis = (AxisInterface) iter3.next(); AxisInterface addAxis = (AxisInterface) correspondingAddAxis.get(origAxis.getAxisId()); if (addAxis instanceof Axis && origAxis instanceof Axis) { List valuesToAdd = ((Axis) addAxis).getAxisValues(); Iterator iter4 = valuesToAdd.iterator(); while (iter4.hasNext()) { Value value = (Value) iter4.next(); if (((Axis) origAxis).getIndexFromAxisValue(value) == -1) { ((Axis) origAxis).addAxisValue(value); } } } else if (addAxis instanceof FieldAxis && origAxis instanceof FieldAxis) { // both are fieldAxis Log.errorln("Dont know how to merge field Axis data. Aborting."); System.exit(-1); } else { // mixed class Axes?? (e.g. a fieldAxis id matches Axis id??!? Error!!) Log.errorln("Dont know how to merge data. Aborting."); System.exit(-1); } } // 3. Append data from one array to the other appropriately Locator origLocator = arrayToAppendTo.createLocator(); Locator addLocator = arrayToAdd.createLocator(); while (addLocator.hasNext()) { try { // retrieve the data Object data = arrayToAdd.getData(addLocator); // set up the origLocator List locatorAxisList = addLocator.getIterationOrder(); Iterator iter5 = locatorAxisList.iterator(); Log.debug("Appending data to array("); while (iter5.hasNext()) { Axis addAxis = (Axis) iter5.next(); Value thisAxisValue = addLocator.getAxisValue(addAxis); Axis thisAxis = (Axis) correspondingOrigAxis.get(addAxis.getAxisId()); try { origLocator.setAxisIndexByAxisValue(thisAxis, thisAxisValue); Log.debug(origLocator.getAxisIndex(thisAxis)+","); } catch (AxisLocationOutOfBoundsException e) { Log.errorln("Weird axis out of bounds error for append array."); } } // add in the data as appropriate. Log.debugln(") => ["+data.toString()+"]"); try { if (data instanceof Double) arrayToAppendTo.setData(origLocator, (Double) data); else if (data instanceof Integer) arrayToAppendTo.setData(origLocator, (Integer) data); else if (data instanceof String ) arrayToAppendTo.setData(origLocator, (String) data); else Log.errorln("Cant understand class of data !(Double|Integer|String). ignoring append"); } catch (SetDataException e) { Log.errorln("Cant setData. Ignoring append"); } } catch (NoDataException e) { // do nothing for NoDataValues?? } addLocator.next(); // go to next location } } else Log.errorln("Cannot append to null array. Ignoring request."); return arrayToAppendTo; }
|
private ArrayInterface appendArrayToArray ( ArrayInterface arrayToAppendTo, ArrayInterface arrayToAdd ) { if (arrayToAppendTo != null) { List origAxisList = arrayToAppendTo.getAxes(); List addAxisList = arrayToAdd.getAxes(); Hashtable correspondingAddAxis = new Hashtable(); Hashtable correspondingOrigAxis = new Hashtable(); // 1. determine the proper alignment of the axes between both arrays // Then cross-reference each in lookup Hashtables. Iterator iter = origAxisList.iterator(); while (iter.hasNext()) { AxisInterface origAxis = (AxisInterface) iter.next(); String align = origAxis.getAlign(); // search the list of the other array for a matching axis boolean gotAMatch = false; Iterator iter2 = addAxisList.iterator(); while (iter2.hasNext()) { AxisInterface addAxis = (AxisInterface) iter2.next(); String thisAlign = addAxis.getAlign(); if(thisAlign != null) { if(thisAlign.equals(align)) { correspondingAddAxis.put(origAxis.getAxisId(), addAxis); correspondingOrigAxis.put(addAxis.getAxisId(), origAxis); gotAMatch = true; break; } } else { Log.errorln("Cant align axes, axis missing defined align attribute. Aborting."); return arrayToAppendTo; } } // no match?? then alignments are mis-specified. if (!gotAMatch) { Log.errorln("Cant align axes, axis has align attribute that is mis-specified. Aborting."); return arrayToAppendTo; } } // 2. "Append" axis values to original axis. Because // there are 2 different ways to add in data we either // have a pre-existing axis value, in which case we dont // need to expand the existing axis, or there is no pre-existing // value so we tack it in. We need to figure out here if an // axis value already exists, and if it doesnt then we add it in. // Iterator iter3 = origAxisList.iterator(); while (iter3.hasNext()) { AxisInterface origAxis = (AxisInterface) iter3.next(); AxisInterface addAxis = (AxisInterface) correspondingAddAxis.get(origAxis.getAxisId()); if (addAxis instanceof Axis && origAxis instanceof Axis) { List valuesToAdd = ((Axis) addAxis).getAxisValues(); Iterator iter4 = valuesToAdd.iterator(); while (iter4.hasNext()) { Value value = (Value) iter4.next(); if (((Axis) origAxis).getIndexFromAxisValue(value) == -1) { ((Axis) origAxis).addAxisValue(value); } } } else if (addAxis instanceof FieldAxis && origAxis instanceof FieldAxis) { // both are fieldAxis Log.errorln("Dont know how to merge field Axis data. Aborting."); System.exit(-1); } else { // mixed class Axes?? (e.g. a fieldAxis id matches Axis id??!? Error!!) Log.errorln("Dont know how to merge data. Aborting."); System.exit(-1); } } // 3. Append data from one array to the other appropriately Locator origLocator = arrayToAppendTo.createLocator(); Locator addLocator = arrayToAdd.createLocator(); while (addLocator.hasNext()) { try { // retrieve the data Object data = arrayToAdd.getData(addLocator); // set up the origLocator List locatorAxisList = addLocator.getIterationOrder(); Iterator iter5 = locatorAxisList.iterator(); Log.debug("Appending data to array("); while (iter5.hasNext()) { Axis addAxis = (Axis) iter5.next(); Value thisAxisValue = addLocator.getAxisValue(addAxis); Axis thisAxis = (Axis) correspondingOrigAxis.get(addAxis.getAxisId()); try { origLocator.setAxisIndexByAxisValue(thisAxis, thisAxisValue); Log.debug(origLocator.getAxisIndex(thisAxis)+","); } catch (AxisLocationOutOfBoundsException e) { Log.errorln("Weird axis out of bounds error for append array."); } } // add in the data as appropriate. Log.debugln(") => ["+data.toString()+"]"); try { if (data instanceof Double) arrayToAppendTo.setData(origLocator, (Double) data); else if (data instanceof Integer) arrayToAppendTo.setData(origLocator, (Integer) data); else if (data instanceof String ) arrayToAppendTo.setData(origLocator, (String) data); else Log.errorln("Cant understand class of data !(Double|Integer|String). ignoring append"); } catch (SetDataException e) { Log.errorln("Cant setData. Ignoring append"); } } catch (NoDataException e) { // do nothing for NoDataValues?? } addLocator.next(); // go to next location } } else Log.errorln("Cannot append to null array. Ignoring request."); return arrayToAppendTo; }
| 8,534
|
public Array getCurrentArray () { return CurrentArray; }
|
public ArrayInterface getCurrentArray () { return CurrentArray; }
| 8,535
|
public Structure getCurrentStructure () { return CurrentStructure; }
|
public StructureInterface getCurrentStructure () { return CurrentStructure; }
| 8,536
|
private void init () { // set up logging, needed ?? Log.configure("XDFLogConfig"); // assign/init 'globals' (e.g. object fields) XDF = new Structure(); Options = new Hashtable(); startElementHandlerHashtable = new Hashtable(); // start node handler charDataHandlerHashtable = new Hashtable(); // charData handler endElementHandlerHashtable = new Hashtable(); // end node handler // initialize the default XDF parser dispatch tables initStartHandlerHashtable(); initCharDataHandlerHashtable(); initEndHandlerHashtable(); }
|
private void init () { // set up logging, needed ?? Log.configure("XDFLogConfig"); // assign/init 'globals' (e.g. object fields) XDF = new XDF(); Options = new Hashtable(); startElementHandlerHashtable = new Hashtable(); // start node handler charDataHandlerHashtable = new Hashtable(); // charData handler endElementHandlerHashtable = new Hashtable(); // end node handler // initialize the default XDF parser dispatch tables initStartHandlerHashtable(); initCharDataHandlerHashtable(); initEndHandlerHashtable(); }
| 8,537
|
public void setCurrentArray(Array array) { CurrentArray = array; }
|
private void setCurrentArray(ArrayInterface array) { CurrentArray = array; }
| 8,538
|
public void setCurrentDatatypeObject(Object object) { CurrentDatatypeObject = object; }
|
private void setCurrentDatatypeObject(Object object) { CurrentDatatypeObject = object; }
| 8,539
|
public void setCurrentStructure (Structure structure) { CurrentStructure = structure; }
|
private void setCurrentStructure (StructureInterface structure) { CurrentStructure = structure; }
| 8,540
|
public GnuRSAPublicKey(final BigInteger n, final BigInteger e) { // super(n); super(n, e); // // this.e = e; }
|
public GnuRSAPublicKey(final BigInteger n, final BigInteger e) { // super(n); this(Registry.RAW_ENCODING_ID, n, e); // // this.e = e; }
| 8,541
|
public byte[] getEncoded(final int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePublicKey(this); break; default: throw new IllegalArgumentException("format"); } return result; }
|
public byte[] getEncoded(final int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePublicKey(this); break; default: throw new IllegalArgumentException("Unsupported encoding format: " + format); } return result; }
| 8,542
|
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
|
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
| 8,543
|
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
|
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } catch (IllegalArgumentException ignored) { throw new IllegalArgumentException("magic"); } }
| 8,544
|
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { throw new IllegalArgumentException("magic"); } }
|
public static GnuRSAPublicKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PUBLIC_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPublicKey) codec.decodePublicKey(k); } else { } }
| 8,545
|
public long skip(long n) throws IOException { if (n < 0) throw new IllegalArgumentException(); int len = 2048; if (n < len) len = (int) n; byte[] tmp = new byte[len]; return (long) read(tmp); }
|
public long skip(long n) throws IOException { if (n < 0) throw new IllegalArgumentException(); int len = 2048; if (n < len) len = (int) n; byte[] tmp = new byte[len]; return (long) read(tmp); }
| 8,548
|
public void dump (byte[] abyte0) { try { System.out.print("\n Buffer Dump of data from AS400: "); dw.write("\r\n Buffer Dump of data from AS400: ".getBytes()); StringBuffer h = new StringBuffer(); for (int x = 0; x < abyte0.length; x++) { if (x % 16 == 0) { System.out.println(" " + h.toString()); dw.write((" " + h.toString() + "\r\n").getBytes()); h.setLength(0); h.append("+0000"); h.setLength(5 - Integer.toHexString(x).length()); h.append(Integer.toHexString(x).toUpperCase()); System.out.print(h.toString()); dw.write(h.toString().getBytes()); h.setLength(0); } char ac = codePage.ebcdic2uni(abyte0[x]); if (ac < ' ') h.append('.'); else h.append(ac); if (x % 4 == 0) { System.out.print(" "); dw.write((" ").getBytes()); } if (Integer.toHexString(abyte0[x] & 0xff).length() == 1){ System.out.print("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write(("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } else { System.out.print(Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write((Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } } System.out.println(); dw.write("\r\n".getBytes()); dw.flush(); } catch(EOFException _ex) { } catch(Exception _ex) { System.out.println("Cannot dump from host\n\r"); } }
|
public void dump (byte[] abyte0) { try { log.info("\n Buffer Dump of data from AS400: "); dw.write("\r\n Buffer Dump of data from AS400: ".getBytes()); StringBuffer h = new StringBuffer(); for (int x = 0; x < abyte0.length; x++) { if (x % 16 == 0) { System.out.println(" " + h.toString()); dw.write((" " + h.toString() + "\r\n").getBytes()); h.setLength(0); h.append("+0000"); h.setLength(5 - Integer.toHexString(x).length()); h.append(Integer.toHexString(x).toUpperCase()); System.out.print(h.toString()); dw.write(h.toString().getBytes()); h.setLength(0); } char ac = codePage.ebcdic2uni(abyte0[x]); if (ac < ' ') h.append('.'); else h.append(ac); if (x % 4 == 0) { System.out.print(" "); dw.write((" ").getBytes()); } if (Integer.toHexString(abyte0[x] & 0xff).length() == 1){ System.out.print("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write(("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } else { System.out.print(Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write((Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } } System.out.println(); dw.write("\r\n".getBytes()); dw.flush(); } catch(EOFException _ex) { } catch(Exception _ex) { System.out.println("Cannot dump from host\n\r"); } }
| 8,549
|
public void dump (byte[] abyte0) { try { System.out.print("\n Buffer Dump of data from AS400: "); dw.write("\r\n Buffer Dump of data from AS400: ".getBytes()); StringBuffer h = new StringBuffer(); for (int x = 0; x < abyte0.length; x++) { if (x % 16 == 0) { System.out.println(" " + h.toString()); dw.write((" " + h.toString() + "\r\n").getBytes()); h.setLength(0); h.append("+0000"); h.setLength(5 - Integer.toHexString(x).length()); h.append(Integer.toHexString(x).toUpperCase()); System.out.print(h.toString()); dw.write(h.toString().getBytes()); h.setLength(0); } char ac = codePage.ebcdic2uni(abyte0[x]); if (ac < ' ') h.append('.'); else h.append(ac); if (x % 4 == 0) { System.out.print(" "); dw.write((" ").getBytes()); } if (Integer.toHexString(abyte0[x] & 0xff).length() == 1){ System.out.print("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write(("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } else { System.out.print(Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write((Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } } System.out.println(); dw.write("\r\n".getBytes()); dw.flush(); } catch(EOFException _ex) { } catch(Exception _ex) { System.out.println("Cannot dump from host\n\r"); } }
|
public void dump (byte[] abyte0) { try { System.out.print("\n Buffer Dump of data from AS400: "); dw.write("\r\n Buffer Dump of data from AS400: ".getBytes()); StringBuffer h = new StringBuffer(); for (int x = 0; x < abyte0.length; x++) { if (x % 16 == 0) { System.out.println(" " + h.toString()); dw.write((" " + h.toString() + "\r\n").getBytes()); h.setLength(0); h.append("+0000"); h.setLength(5 - Integer.toHexString(x).length()); h.append(Integer.toHexString(x).toUpperCase()); System.out.print(h.toString()); dw.write(h.toString().getBytes()); h.setLength(0); } char ac = codePage.ebcdic2uni(abyte0[x]); if (ac < ' ') h.append('.'); else h.append(ac); if (x % 4 == 0) { System.out.print(" "); dw.write((" ").getBytes()); } if (Integer.toHexString(abyte0[x] & 0xff).length() == 1){ System.out.print("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write(("0" + Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } else { System.out.print(Integer.toHexString(abyte0[x] & 0xff).toUpperCase()); dw.write((Integer.toHexString(abyte0[x] & 0xff).toUpperCase()).getBytes()); } } System.out.println(); dw.write("\r\n".getBytes()); dw.flush(); } catch(EOFException _ex) { } catch(Exception _ex) { log.warn("Cannot dump from host\n\r"); } }
| 8,550
|
private final void loadStream(byte abyte0[], int i) throws IOException { int j = 0; int size = 0; if (saveStream == null) { j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff; size = abyte0.length; } else { size = saveStream.length + abyte0.length; byte[] inter = new byte[size]; System.arraycopy(saveStream, 0, inter, 0, saveStream.length); System.arraycopy(abyte0, 0, inter, saveStream.length, abyte0.length); abyte0 = new byte[size]; System.arraycopy(inter, 0, abyte0, 0, size); saveStream = null; inter = null; j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff;// System.out.println("partial stream found"); } if (j > size) { saveStream = new byte[abyte0.length]; System.arraycopy(abyte0, 0, saveStream, 0, abyte0.length);// System.out.println("partial stream saved"); } else { byte abyte1[]; try { abyte1 = new byte[j + 2]; System.arraycopy(abyte0, i, abyte1, 0, j + 2); dsq.put(new Stream5250(abyte1)); if(abyte0.length > abyte1.length + i) loadStream(abyte0, i + j + 2); } catch (Exception ex) { System.out.println("load stream error " + ex.getMessage()); // ex.printStackTrace(); // dump(abyte0); } } }
|
private final void loadStream(byte abyte0[], int i) throws IOException { int j = 0; int size = 0; if (saveStream == null) { j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff; size = abyte0.length; } else { size = saveStream.length + abyte0.length; byte[] inter = new byte[size]; System.arraycopy(saveStream, 0, inter, 0, saveStream.length); System.arraycopy(abyte0, 0, inter, saveStream.length, abyte0.length); abyte0 = new byte[size]; System.arraycopy(inter, 0, abyte0, 0, size); saveStream = null; inter = null; j = (abyte0[i] & 0xff) << 8 | abyte0[i + 1] & 0xff;// System.out.println("partial stream found"); } if (j > size) { saveStream = new byte[abyte0.length]; System.arraycopy(abyte0, 0, saveStream, 0, abyte0.length);// System.out.println("partial stream saved"); } else { byte abyte1[]; try { abyte1 = new byte[j + 2]; System.arraycopy(abyte0, i, abyte1, 0, j + 2); dsq.put(new Stream5250(abyte1)); if(abyte0.length > abyte1.length + i) loadStream(abyte0, i + j + 2); } catch (Exception ex) { log.warn("load stream error " + ex.getMessage()); // ex.printStackTrace(); // dump(abyte0); } } }
| 8,553
|
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
|
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { log.warn(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
| 8,554
|
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
|
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); log.warn(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
| 8,555
|
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { System.out.println(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
|
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { System.out.println(" run() " + ioef.getMessage()); } while (!done) { try { byte[] abyte0 = readIncoming(); // WVL - LDC : 16/07/2003 : TR.000345 // When the socket has been closed, the reading returns // no bytes (an empty byte arrray). // But the loadStream fails on this, so we check it here! if (abyte0.length > 0) { loadStream(abyte0, 0); } // WVL - LDC : 16/07/2003 : TR.000345 // Returning no bytes means the input buffer has // reached end-of-stream, so we do a disconnect! else { done = true; vt.disconnect(); } } catch (SocketException se) {// System.out.println(" DataStreamProducer thread interrupted and stopping " + se.getMessage()); System.out.println(" DataStreamProducer thread interrupted and stopping "); done = true; } catch (IOException ioe) {// System.out.println(ioe.getMessage()); if (me.isInterrupted()) done = true; } catch (Exception ex) { log.warn(ex.getMessage()); if (me.isInterrupted()) done = true; } } }
| 8,557
|
public void run() { Socket socket = null; DataInputStream datainputstream = null; String localFileFull = localFileF; executeCommand("TYPE","I"); try { socket = createPassiveSocket("RETR " + remoteFileF); if(socket != null) { datainputstream = new DataInputStream(socket.getInputStream()); writeHeader(localFileFull); byte abyte0[] = new byte[recordLength]; StringBuffer rb = new StringBuffer(recordOutLength); int c = 0; int kj = 0; int len = 0; for(int j = 0; j != -1 && !aborted;) { j = datainputstream.read(); if(j == -1) break; c ++; abyte0[len++] = (byte)j; if (len == recordLength) { rb.setLength(0); parseFFD(abyte0,rb); len =0; status.setCurrentRecord(c / recordLength); fireStatusEvent(); } getThread.yield(); // if ((c / recordLength) == 200) // aborted = true; } System.out.println(c); if (c == 0) { status.setCurrentRecord(c); fireStatusEvent(); } else { if (!aborted) parseResponse(); } writeFooter();// parseResponse(); printFTPInfo("Transfer complete!"); } } catch(InterruptedIOException iioe) { printFTPInfo("Interrupted! " + iioe.getMessage()); } catch(Exception _ex) { printFTPInfo("Error! " + _ex); } finally { try { socket.close(); } catch(Exception _ex) { } try { datainputstream.close(); } catch(Exception _ex) { } try { writeFooter(); } catch(Exception _ex) { } disconnect(); } }
|
public void run() { Socket socket = null; DataInputStream datainputstream = null; String localFileFull = localFileF; executeCommand("TYPE","I"); try { socket = createPassiveSocket("RETR " + remoteFileF); if(socket != null) { datainputstream = new DataInputStream(socket.getInputStream()); writeHeader(localFileFull); byte abyte0[] = new byte[recordLength]; StringBuffer rb = new StringBuffer(recordOutLength); int c = 0; int kj = 0; int len = 0; for(int j = 0; j != -1 && !aborted;) { j = datainputstream.read(); if(j == -1) break; c ++; abyte0[len++] = (byte)j; if (len == recordLength) { rb.setLength(0); parseFFD(abyte0,rb); len =0; status.setCurrentRecord(c / recordLength); fireStatusEvent(); } Thread.yield(); // if ((c / recordLength) == 200) // aborted = true; } System.out.println(c); if (c == 0) { status.setCurrentRecord(c); fireStatusEvent(); } else { if (!aborted) parseResponse(); } writeFooter();// parseResponse(); printFTPInfo("Transfer complete!"); } } catch(InterruptedIOException iioe) { printFTPInfo("Interrupted! " + iioe.getMessage()); } catch(Exception _ex) { printFTPInfo("Error! " + _ex); } finally { try { socket.close(); } catch(Exception _ex) { } try { datainputstream.close(); } catch(Exception _ex) { } try { writeFooter(); } catch(Exception _ex) { } disconnect(); } }
| 8,558
|
public StackManagerImpl(X86RegisterPool pool) { this.pool = pool; }
|
public StackManagerImpl(X86RegisterPool pool, ItemFactory ifac) { this.pool = pool; }
| 8,559
|
public void writePUSH(int jvmType, Register reg) { final Item item = WordItem.createReg(jvmType, reg); Item.assertCondition(pool.request(reg, item), "request"); push(item); }
|
public void writePUSH(int jvmType, Register reg) { final Item item = ifac.createReg(jvmType, reg); Item.assertCondition(pool.request(reg, item), "request"); push(item); }
| 8,561
|
public void writePUSH64(int jvmType, Register lsbReg, Register msbReg) { final Item item; switch (jvmType) { case JvmType.LONG: item = LongItem.createReg(lsbReg, msbReg); break; case JvmType.DOUBLE: item = DoubleItem.createReg(lsbReg, msbReg); break; default: throw new IllegalArgumentException("Unknown JvmType " + jvmType); } Item.assertCondition(pool.request(lsbReg, item), "request-lsb"); Item.assertCondition(pool.request(msbReg, item), "request-msb"); push(item); }
|
public void writePUSH64(int jvmType, Register lsbReg, Register msbReg) { final Item item; switch (jvmType) { case JvmType.LONG: item = LongItem.createReg(lsbReg, msbReg); break; case JvmType.DOUBLE: item = DoubleItem.createReg(lsbReg, msbReg); break; default: throw new IllegalArgumentException("Unknown JvmType " + jvmType); } Item.assertCondition(pool.request(lsbReg, item), "request-lsb"); Item.assertCondition(pool.request(msbReg, item), "request-msb"); push(item); }
| 8,562
|
final AbstractX86StackManager createStackMgr(X86RegisterPool pool) { return new StackManagerImpl(pool); }
|
final AbstractX86StackManager createStackMgr(X86RegisterPool pool) { return new StackManagerImpl(pool); }
| 8,563
|
final void pushAll(TypeStack tstack) { if ((tstack != null) && !tstack.isEmpty()) { final int size = tstack.size(); for (int i = 0; i < size; i++) { final int type = tstack.getType(i); final Item item = VirtualStack.createStack(type); push(item); if (VirtualStack.checkOperandStack) { operandStack.push(item); } } } }
|
final void pushAll(ItemFactory ifac, TypeStack tstack) { if ((tstack != null) && !tstack.isEmpty()) { final int size = tstack.size(); for (int i = 0; i < size; i++) { final int type = tstack.getType(i); final Item item = VirtualStack.createStack(type); push(item); if (VirtualStack.checkOperandStack) { operandStack.push(item); } } } }
| 8,564
|
final void pushAll(TypeStack tstack) { if ((tstack != null) && !tstack.isEmpty()) { final int size = tstack.size(); for (int i = 0; i < size; i++) { final int type = tstack.getType(i); final Item item = VirtualStack.createStack(type); push(item); if (VirtualStack.checkOperandStack) { operandStack.push(item); } } } }
|
final void pushAll(TypeStack tstack) { if ((tstack != null) && !tstack.isEmpty()) { final int size = tstack.size(); for (int i = 0; i < size; i++) { final int type = tstack.getType(i); final Item item = ifac.createStack(type); push(item); if (VirtualStack.checkOperandStack) { operandStack.push(item); } } } }
| 8,565
|
public String getUIClassID() { return uiClassID; }
|
public String getUIClassID() { return "ComboBoxUI"; }
| 8,567
|
public void setEditable(boolean editable) { if (isEditable != editable) { isEditable = editable; firePropertyChange(EDITABLE_CHANGED_PROPERTY, ! isEditable, isEditable); } }
|
public void setEditable(boolean editable) { if (isEditable != editable) { isEditable = editable; firePropertyChange("editable", ! isEditable, isEditable); } }
| 8,568
|
public void setEditor(ComboBoxEditor newEditor) { if (editor == newEditor) return; if (editor != null) editor.removeActionListener(this); ComboBoxEditor oldEditor = editor; editor = newEditor; if (editor != null) editor.addActionListener(this); firePropertyChange(EDITOR_CHANGED_PROPERTY, oldEditor, editor); }
|
public void setEditor(ComboBoxEditor newEditor) { if (editor == newEditor) return; if (editor != null) editor.removeActionListener(this); ComboBoxEditor oldEditor = editor; editor = newEditor; if (editor != null) editor.addActionListener(this); firePropertyChange("editor", oldEditor, editor); }
| 8,569
|
public void setEnabled(boolean enabled) { boolean oldEnabled = super.isEnabled(); if (enabled != oldEnabled) { super.setEnabled(enabled); firePropertyChange(ENABLED_CHANGED_PROPERTY, oldEnabled, (boolean) enabled); } }
|
public void setEnabled(boolean enabled) { boolean oldEnabled = super.isEnabled(); if (enabled != oldEnabled) { super.setEnabled(enabled); firePropertyChange(ENABLED_CHANGED_PROPERTY, oldEnabled, (boolean) enabled); } }
| 8,570
|
public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = maximumRowCount; maximumRowCount = rowCount; firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY, oldMaximumRowCount, maximumRowCount); } }
|
public void setMaximumRowCount(int rowCount) { if (maximumRowCount != rowCount) { int oldMaximumRowCount = maximumRowCount; maximumRowCount = rowCount; firePropertyChange("maximumRowCount", oldMaximumRowCount, maximumRowCount); } }
| 8,571
|
public void setModel(ComboBoxModel newDataModel) { // dataModel is null if it this method is called from inside the constructors. if(dataModel != null) { // Prevents unneccessary updates. if (dataModel == newDataModel) return; // Removes itself (as DataListener) from the to-be-replaced model. dataModel.removeListDataListener(this); } /* Adds itself as a DataListener to the new model. * It is intentioned that this operation will fail with a NullPointerException if the * caller delivered a null argument. */ newDataModel.addListDataListener(this); // Stores old data model for event notification. ComboBoxModel oldDataModel = dataModel; dataModel = newDataModel; // Notifies the listeners of the model change. firePropertyChange(MODEL_CHANGED_PROPERTY, oldDataModel, dataModel); }
|
public void setModel(ComboBoxModel newDataModel) { // dataModel is null if it this method is called from inside the constructors. if(dataModel != null) { // Prevents unneccessary updates. if (dataModel == newDataModel) return; // Removes itself (as DataListener) from the to-be-replaced model. dataModel.removeListDataListener(this); } /* Adds itself as a DataListener to the new model. * It is intentioned that this operation will fail with a NullPointerException if the * caller delivered a null argument. */ newDataModel.addListDataListener(this); // Stores old data model for event notification. ComboBoxModel oldDataModel = dataModel; dataModel = newDataModel; // Notifies the listeners of the model change. firePropertyChange("model", oldDataModel, dataModel); }
| 8,572
|
public void setRenderer(ListCellRenderer aRenderer) { if (renderer != aRenderer) { ListCellRenderer oldRenderer = renderer; renderer = aRenderer; firePropertyChange(RENDERER_CHANGED_PROPERTY, oldRenderer, renderer); } }
|
public void setRenderer(ListCellRenderer aRenderer) { if (renderer != aRenderer) { ListCellRenderer oldRenderer = renderer; renderer = aRenderer; firePropertyChange("renderer", oldRenderer, renderer); } }
| 8,573
|
public static Throwable systemException(int nr, int address) throws PragmaUninterruptible, PragmaLoadStatics, PragmaPrivilegedAction { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); //Unsafe.die(); Unsafe.debug(nr); Unsafe.debug(address); final String hexAddress = NumberUtils.hex(address, 8); final String state = " (" + Unsafe.getCurrentProcessor().getCurrentThread().getReadableErrorState() + ")"; switch (nr) { case EX_NULLPOINTER : return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT : return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS : return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0 : return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD : return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW : return new StackOverflowError(); case EX_CLASSCAST : return new ClassCastException(); default : return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
|
public static Throwable systemException(int nr, int address) throws PragmaUninterruptible, PragmaLoadStatics, PragmaPrivilegedAction { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); //Unsafe.die(); final String hexAddress = NumberUtils.hex(address, 8); final String state = " (" + Unsafe.getCurrentProcessor().getCurrentThread().getReadableErrorState() + ")"; switch (nr) { case EX_NULLPOINTER : return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT : return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS : return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0 : return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD : return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW : return new StackOverflowError(); case EX_CLASSCAST : return new ClassCastException(); default : return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
| 8,574
|
public static Throwable systemException(int nr, int address) throws PragmaUninterruptible, PragmaLoadStatics, PragmaPrivilegedAction { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); //Unsafe.die(); Unsafe.debug(nr); Unsafe.debug(address); final String hexAddress = NumberUtils.hex(address, 8); final String state = " (" + Unsafe.getCurrentProcessor().getCurrentThread().getReadableErrorState() + ")"; switch (nr) { case EX_NULLPOINTER : return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT : return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS : return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0 : return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD : return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW : return new StackOverflowError(); case EX_CLASSCAST : return new ClassCastException(); default : return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
|
public static Throwable systemException(int nr, int address) throws PragmaUninterruptible, PragmaLoadStatics, PragmaPrivilegedAction { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); //Unsafe.die(); Unsafe.debug(nr); Unsafe.debug(address); final String hexAddress = NumberUtils.hex(address, 8); final VmThread current = Unsafe.getCurrentProcessor().getCurrentThread(); final String state = " (" + current.getReadableErrorState() + ")"; current.setInSystemException(); switch (nr) { case EX_NULLPOINTER : return new NullPointerException("NPE at address " + hexAddress + state); case EX_PAGEFAULT : return new InternalError("Page fault at " + hexAddress + state); case EX_INDEXOUTOFBOUNDS : return new ArrayIndexOutOfBoundsException("Out of bounds at index " + address + state); case EX_DIV0 : return new ArithmeticException("Division by zero at address " + hexAddress + state); case EX_ABSTRACTMETHOD : return new AbstractMethodError("Abstract method at " + hexAddress + state); case EX_STACKOVERFLOW : return new StackOverflowError(); case EX_CLASSCAST : return new ClassCastException(); default : return new UnknownError("Unknown system-exception at " + hexAddress + state); } }
| 8,575
|
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ReflectPermission("suppressAccessChecks")); } }
|
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new ReflectPermission("suppressAccessChecks")); } }
| 8,576
|
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ReflectPermission("suppressAccessChecks")); } }
|
private static final void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ReflectPermission("suppressAccessChecks"));
| 8,577
|
protected void resolve() throws PluginException { final ExtensionPointModel ep = (ExtensionPointModel) getDeclaringPluginDescriptor().getPluginRegistry().getExtensionPoint(point); if (ep == null) { throw new PluginException("Unknown extension-point " + point); } else { ep.add(this); } }
|
protected void resolve() throws PluginException { final ExtensionPointModel ep = (ExtensionPointModel) getDeclaringPluginDescriptor().getPluginRegistry().getExtensionPoint(point); if (ep == null) { throw new PluginException("Unknown extension-point " + point); } else { ep.add(this); } }
| 8,578
|
protected void unresolve() throws PluginException { final ExtensionPointModel ep = (ExtensionPointModel) getDeclaringPluginDescriptor().getPluginRegistry().getExtensionPoint(point); if (ep == null) { throw new PluginException("Unknown extension-point " + point); } else { ep.remove(this); } }
|
protected void unresolve() throws PluginException { final ExtensionPointModel ep = (ExtensionPointModel) getDeclaringPluginDescriptor().getPluginRegistry().getExtensionPoint(point); if (ep == null) { throw new PluginException("Unknown extension-point " + point); } else { ep.remove(this); } }
| 8,579
|
public final void visit_getstatic(VmConstFieldRef fieldRef) { fieldRef.resolve(loader); final int type = JvmType.SignatureToType(fieldRef.getSignature()); final VmStaticField sf = (VmStaticField) fieldRef.getResolvedVmField(); // Initialize if needed if (!sf.getDeclaringClass().isInitialized()) { final X86RegisterPool pool = eContext.getGPRPool(); final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.INT, false); writeInitializeClass(fieldRef, tmp); pool.release(tmp); } // Get static field object if (JvmType.isFloat(type)) { final boolean is32bit = !fieldRef.isWide(); if (sf.isShared()) { helper.writeGetStaticsEntryToFPU(curInstrLabel, (VmSharedStaticsEntry)sf, is32bit); } else { final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.REFERENCE, false); helper.writeGetStaticsEntryToFPU(curInstrLabel, (VmIsolatedStaticsEntry) sf, is32bit, tmp); L1AHelper.releaseRegister(eContext, tmp); } final Item result = ifac.createFPUStack(type); vstack.fpuStack.push(result); vstack.push(result); } else if (!fieldRef.isWide()) { final WordItem result = L1AHelper.requestWordRegister(eContext, type, false); final GPR resultr = result.getRegister(); if (os.isCode32() || (type != JvmType.REFERENCE)) { if (sf.isShared()) { helper.writeGetStaticsEntry(curInstrLabel, resultr, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry(curInstrLabel, resultr, (VmIsolatedStaticsEntry)sf); } } else { if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, (GPR64)resultr, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, (GPR64)resultr, (VmIsolatedStaticsEntry)sf); } } vstack.push(result); } else { final DoubleWordItem result = L1AHelper.requestDoubleWordRegisters( eContext, type); if (os.isCode32()) { final GPR lsb = result.getLsbRegister(eContext); final GPR msb = result.getMsbRegister(eContext); if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, lsb, msb, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, lsb, msb, (VmIsolatedStaticsEntry)sf); } } else { final GPR64 reg = result.getRegister(eContext); if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, reg, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, reg, (VmIsolatedStaticsEntry)sf); } } vstack.push(result); } }
|
public final void visit_getstatic(VmConstFieldRef fieldRef) { fieldRef.resolve(loader); final int type = JvmType.SignatureToType(fieldRef.getSignature()); final VmStaticField sf = (VmStaticField) fieldRef.getResolvedVmField(); // Initialize if needed if (!sf.getDeclaringClass().isInitialized()) { final X86RegisterPool pool = eContext.getGPRPool(); final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.INT, false); writeInitializeClass(fieldRef, tmp); pool.release(tmp); } // Get static field object if (JvmType.isFloat(type)) { final boolean is32bit = !fieldRef.isWide(); if (sf.isShared()) { helper.writeGetStaticsEntryToFPU(curInstrLabel, (VmSharedStaticsEntry)sf, is32bit); } else { final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.REFERENCE, false); helper.writeGetStaticsEntryToFPU(curInstrLabel, (VmIsolatedStaticsEntry) sf, is32bit, tmp); L1AHelper.releaseRegister(eContext, tmp); } final Item result = ifac.createFPUStack(type); vstack.fpuStack.push(result); vstack.push(result); } else if (!fieldRef.isWide()) { final WordItem result = L1AHelper.requestWordRegister(eContext, type, false); final GPR resultr = result.getRegister(); if (os.isCode32() || (type != JvmType.REFERENCE)) { if (sf.isShared()) { helper.writeGetStaticsEntry(curInstrLabel, resultr, (VmSharedStaticsEntry)sf); } else { final GPR tmp = (GPR) L1AHelper.requestRegister(eContext, JvmType.REFERENCE, false); helper.writeGetStaticsEntry(curInstrLabel, resultr, (VmIsolatedStaticsEntry) sf, tmp); L1AHelper.releaseRegister(eContext, tmp); } } else { if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, (GPR64)resultr, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, (GPR64)resultr, (VmIsolatedStaticsEntry)sf); } } vstack.push(result); } else { final DoubleWordItem result = L1AHelper.requestDoubleWordRegisters( eContext, type); if (os.isCode32()) { final GPR lsb = result.getLsbRegister(eContext); final GPR msb = result.getMsbRegister(eContext); if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, lsb, msb, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, lsb, msb, (VmIsolatedStaticsEntry)sf); } } else { final GPR64 reg = result.getRegister(eContext); if (sf.isShared()) { helper.writeGetStaticsEntry64(curInstrLabel, reg, (VmSharedStaticsEntry)sf); } else { helper.writeGetStaticsEntry64(curInstrLabel, reg, (VmIsolatedStaticsEntry)sf); } } vstack.push(result); } }
| 8,580
|
public FileLock tryLock (long position, long size, boolean shared) throws IOException { if (position < 0 || size < 0) throw new IllegalArgumentException (); if (!isOpen ()) throw new ClosedChannelException (); if (shared && (mode & READ) == 0) throw new NonReadableChannelException (); if (!shared && (mode & WRITE) == 0) throw new NonWritableChannelException (); boolean completed = false; try { begin(); lock(position, size, shared, true); completed = true; return new FileLockImpl(this, position, size, shared); } finally { end(completed); } }
|
public FileLock tryLock (long position, long size, boolean shared) throws IOException { if (position < 0 || size < 0) throw new IllegalArgumentException (); if (!isOpen ()) throw new ClosedChannelException (); if (shared && (mode & READ) == 0) throw new NonReadableChannelException (); if (!shared && (mode & WRITE) == 0) throw new NonWritableChannelException (); boolean completed = false; try { begin(); lock(position, size, shared, false); completed = true; return new FileLockImpl(this, position, size, shared); } finally { end(completed); } }
| 8,581
|
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { ArrayList axisIds = new ArrayList (); int numberOfAxes = 0; synchronized (parentArray) { List axisList = parentArray.getAxisList(); Iterator iter = axisList.iterator(); while(iter.hasNext()) { AxisInterface axis = (AxisInterface) iter.next(); if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); indent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); } writeOut(outputstream, "<for axisIdRef=\""+axis.getAxisId()+"\">"); numberOfAxes++; } } //write out nodes in formatCommandList synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } ((XMLDataIOStyle) formatCommandList.get(i)).specificIOStyleToXDF(outputstream, indent); } } // end formatCommandList sync // print out remaining for statements while(numberOfAxes-- > 0) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); // peel off some indent indent = indent.substring(0,indent.length() - Specification.getInstance().getPrettyXDFOutputIndentation().length()); writeOut(outputstream, indent); } writeOut(outputstream, "</for>"); } }
|
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { ArrayList axisIds = new ArrayList (); int numberOfAxes = 0; synchronized (parentArray) { List axisList = parentArray.getAxisList(); Iterator iter = axisList.iterator(); while(iter.hasNext()) { AxisInterface axis = (AxisInterface) iter.next(); if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); indent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); } writeOut(outputstream, "<for axisIdRef=\""); writeOutAttribute(outputstream, axis.getAxisId()); writeOut(outputstream, "\">"); numberOfAxes++; } } //write out nodes in formatCommandList synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } ((XMLDataIOStyle) formatCommandList.get(i)).specificIOStyleToXDF(outputstream, indent); } } // end formatCommandList sync // print out remaining for statements while(numberOfAxes-- > 0) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); // peel off some indent indent = indent.substring(0,indent.length() - Specification.getInstance().getPrettyXDFOutputIndentation().length()); writeOut(outputstream, indent); } writeOut(outputstream, "</for>"); } }
| 8,582
|
public void setRowHeight(int r) { if (rowHeight < 1) throw new IllegalArgumentException(); rowHeight = r; revalidate(); repaint(); }
|
public void setRowHeight(int r) { if (r < 1) throw new IllegalArgumentException(); rowHeight = r; revalidate(); repaint(); }
| 8,588
|
private void closeDialog() { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).dispose(); }
|
void closeDialog() { Window owner = SwingUtilities.windowForComponent(filechooser); if (owner instanceof JDialog) ((JDialog) owner).dispose(); }
| 8,590
|
private void filterEntries() { FileFilter[] list = filechooser.getChoosableFileFilters(); if (filters.getItemCount() > 0) filters.removeAllItems(); int index = -1; String selected = filechooser.getFileFilter().getDescription(); for (int i = 0; i < list.length; i++) { if (selected.equals(list[i].getDescription())) index = i; filters.addItem(list[i].getDescription()); } filters.setSelectedIndex(index); filters.revalidate(); filters.repaint(); }
|
void filterEntries() { FileFilter[] list = filechooser.getChoosableFileFilters(); if (filters.getItemCount() > 0) filters.removeAllItems(); int index = -1; String selected = filechooser.getFileFilter().getDescription(); for (int i = 0; i < list.length; i++) { if (selected.equals(list[i].getDescription())) index = i; filters.addItem(list[i].getDescription()); } filters.setSelectedIndex(index); filters.revalidate(); filters.repaint(); }
| 8,591
|
private void createFracture(ElementSpec[] data) { BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element child = paragraph.getElement(index); Edit edit = getEditForParagraphAndIndex(paragraph, index); AttributeSet atts = data[0].getAttributes(); if (offset != 0) { Element newEl1 = createLeafElement(paragraph, atts, child.getStartOffset(), offset); edit.addAddedElement(newEl1); edit.addRemovedElement(child); } }
|
private void createFracture(ElementSpec[] data) { BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element child = paragraph.getElement(index); Edit edit = getEditForParagraphAndIndex(paragraph, index); AttributeSet atts = child.getAttributes(); if (offset != 0) { Element newEl1 = createLeafElement(paragraph, atts, child.getStartOffset(), offset); edit.addAddedElement(newEl1); edit.addRemovedElement(child); } }
| 8,592
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(pos); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
| 8,593
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = pos + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
| 8,594
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (pos != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
| 8,595
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(pos); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), pos); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), pos); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
| 8,596
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), pos, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
| 8,597
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
| 8,598
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != offset) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
|
private void insertFirstContentTag(ElementSpec[] data) { ElementSpec first = data[0]; BranchElement paragraph = (BranchElement) elementStack.peek(); int index = paragraph.getElementIndex(offset); Element current = paragraph.getElement(index); int newEndOffset = offset + first.length; boolean onlyContent = data.length == 1; Edit edit = getEditForParagraphAndIndex(paragraph, index); switch (first.getDirection()) { case ElementSpec.JoinPreviousDirection: if (current.getEndOffset() != newEndOffset && !onlyContent) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), newEndOffset); edit.addAddedElement(newEl1); edit.addRemovedElement(current); offset = newEndOffset; } break; case ElementSpec.JoinNextDirection: if (offset != 0) { Element newEl1 = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl1); Element next = paragraph.getElement(index + 1); if (onlyContent) newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, next.getEndOffset()); else { newEl1 = createLeafElement(paragraph, next.getAttributes(), offset, newEndOffset); offset = newEndOffset; } edit.addAddedElement(newEl1); edit.addRemovedElement(current); edit.addRemovedElement(next); } break; default: if (current.getStartOffset() != pos) { Element newEl = createLeafElement(paragraph, current.getAttributes(), current.getStartOffset(), offset); edit.addAddedElement(newEl); } edit.addRemovedElement(current); Element newEl1 = createLeafElement(paragraph, first.getAttributes(), offset, newEndOffset); edit.addAddedElement(newEl1); if (current.getEndOffset() != endOffset) recreateLeaves(newEndOffset, paragraph, onlyContent); else offset = newEndOffset; break; } }
| 8,599
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.