Coupling error: class file file:/home/gugrim/.netbeans/6.0rc1/var/cache/index/0.7/s68/classes/se/grim/doi/view/DoiObjectView.sig, source file file:/home/gugrim/projects/DOISuite4/trunk/DOI4/src/se/grim/doi/view/DoiObjectView.java ----- Sig file content: ------------------------------------------- GM1;Nse.grim.doi.view.DoiObjectView;;Lse.grim.doi.view.DoiBinderView;Lse.grim.doi.action.DoiOpenWithHandler;;; AM40019;INFEATURE_NewCopy;I20;; AM40009;Ljava.lang.String;NPROPERTY_ObjectKey;X;; AM2;ZNitsLoadingNewCopy;X;; AM2;Lse.grim.doi.model.DoiObjectKey;NitsObjectKey;X;; AM2;Lse.grim.doi.model.DoiObjectKey;NitsObjectKeyCopy;X;; AM2;Lse.grim.doi.model.DoiObjectKey;NitsObjectKeyNext;X;; AM2;Lse.grim.doi.view.DoiSelectionView;NitsSelectionView;X;; AM2;Lse.grim.doi.controller.DoiObjectBrowsable;NitsBrowsable;X;; EM1;N;()()V;; EM1;N;(M200000000;Lse.grim.doi.controller.DoiBinder;NpBinder;)()V;; EM1;NgetActiveObjectPanel;()()Lse.grim.doi.view.DoiObjectPanel;;; EM1;NgetBrowsable;()()Lse.grim.doi.controller.DoiObjectBrowsable;;; EM1;NsetBrowsable;(M200000000;Lse.grim.doi.controller.DoiObjectBrowsable;NpBrowsable;)()V;; EM1;NisDirty;()()Z;; EM1;NisLoadingNewCopy;()()Z;; EM1;NgetObjectKey;()()Lse.grim.doi.model.DoiObjectKey;;; EM1;NgetObjectKeyCopy;()()Lse.grim.doi.model.DoiObjectKey;;; EM1;NsetObjectKey;(M200000000;Lse.grim.doi.model.DoiObjectKey;NpObjectKey;)()V;; EM1;NgetObjectPanel;(M200000000;Ljava.lang.String;NpName;)(Ljava.util.NoSuchElementException;)Lse.grim.doi.view.DoiObjectPanel;;; EM1;NgetObjectPanel;(M200000000;Ljava.lang.Class;NpType;)(Ljava.util.NoSuchElementException;)QT;;; EM1;NgetObjectPanel;(M200000000;INpIndex;)(Ljava.util.NoSuchElementException;)Lse.grim.doi.view.DoiObjectPanel;;; EM1;NgetSelectionView;()()Lse.grim.doi.view.DoiSelectionView;;; EM1;NsetSelectionView;(M200000000;Lse.grim.doi.view.DoiSelectionView;NpSelectionView;)()V;; EM1;NgetUserPreferences;()()REfiValueMap;;; EM1;NsetState;(M200000000;INpState;)()Z;; EM1;NgetViewState;()()I;; EM1;NgetViewType;()()Ljava.lang.String;;; EM1;NactivatePanel;(M200000000;Ljava.lang.String;NpPanelName;)(Ljava.io.IOException;)Lse.grim.doi.view.DoiObjectPanel;;; EM1;NactivatePanel;(M200000000;Ljava.lang.Class;NpType;)(Ljava.io.IOException;)QT;;; EM1;NaddObjectPanel;(M200000000;Lse.grim.doi.view.DoiObjectPanel;NpPanel;)()V;; EM4;NbuildTitle;()()Ljava.lang.String;;; EM4;NbuildTitleSuffix;()()Ljava.lang.String;;; EM1;NcanCopyObjects;()()Lse.grim.doi.controller.DoiObjectCopyInfo;;; EM1;NcontextMenuRequested;(M200000000;Ljava.awt.event.InputEvent;NpEvent;)()Lse.grim.doi.action.DoiActionList;;; EM1;NcopyObjects;(M200000000;Lse.grim.doi.controller.DoiObjectClipboard;NpClipboard;)(Ljava.io.IOException;)V;; EM4;NcreateActionSet;()()Lse.grim.doi.action.DoiActionSet;;; EM4;NcreateBookmark;()()Lse.grim.doi.bookmark.DoiBookmark;;; EM4;NcreateBookmarkTitle;()()Ljava.lang.String;;; EM1;NdoActionFileOpen;(M200000000;Ljava.awt.event.ActionEvent;NpEvent;)(Ljava.io.IOException;)V;; EM1;NdoActionBookmarkOpen;(M200000000;Ljava.awt.event.ActionEvent;NpEvent;M200000000;Lse.grim.doi.bookmark.DoiBookmark;NpBookmark;)(Ljava.io.IOException;)VLjava.lang.Override;;;; EM1;NdoActionBrowse;(M200000000;Ljava.awt.event.ActionEvent;NpEvent;M200000000;INpBrowseDir;)(Ljava.io.IOException;)V;; EM1;NdoActionFileDelete;(M200000000;Ljava.awt.event.ActionEvent;NpEvent;)(Ljava.io.IOException;)V;; EM1;NdoActionFileExport;(M200000000;Ljava.awt.event.ActionEvent;NpEvent;)(Ljava.io.IOException;)V;; EM1;NdoActionFileNew;(M200000000;Ljava.awt.event.ActionEvent;NpEvent;)(Ljava.io.IOException;)V;; EM1;NdoActionFileNewCopy;(M200000000;Ljava.awt.event.ActionEvent;NpEvent;)(Ljava.io.IOException;)V;; EM1;NdoActionViewCriteria;(M200000000;Ljava.awt.event.ActionEvent;NpEvent;)(Ljava.io.IOException;)V;; EM1;NdoActionViewSelection;(M200000000;Ljava.awt.event.ActionEvent;NpEvent;)(Ljava.io.IOException;)V;; EM1;NensurePopulated;()(Ljava.io.IOException;)V;; EM4;NexportFileChooser;()(Ljava.io.IOException;)Lse.grim.doi.util.DoiFileChooser;;; EM1;NexportObjects;(M200000000;Ljava.lang.String;NpExportType;M200000000;Ljava.io.OutputStream;NpOutput;M200000000;Ljava.lang.String;NpFileType;)(Ljava.io.IOException;)VLjava.lang.Override;;;; EM1;NobjectDeleted;(M200000000;Lse.grim.doi.controller.DoiBinder;NpBinder;M200000000;Lse.grim.doi.model.DoiObjectKey;NpObjectKey;)(Ljava.io.IOException;)VLjava.lang.Override;;;; EM1;NopenObject;(M200000000;Lse.grim.doi.model.DoiObjectKey;NpObjectKey;)(Ljava.io.IOException;)V;; EM1;NopenObject;(M200000000;Lse.grim.doi.model.DoiObjectKey;NpObjectKey;M200000000;Ljava.awt.Point;NpLocation;)(Ljava.io.IOException;)V;; EM1;NopenWith;(M200000000;Lse.grim.doi.action.DoiOpenWithAction;NpAction;M200000000;Ljava.awt.event.ActionEvent;NpEvent;)(Ljava.io.IOException;)V;; EM1;NreportList;(M200000000;Lse.grim.doi.print.DoiPrintView;NpPrintView;)()Ljava.util.List;Ljava.lang.Override;;;; EM1;NprintView;(M200000000;Lse.grim.doi.print.DoiReport;NpReport;M200000000;INpDestType;M200000000;Ljava.lang.Object;NpDestination;)(Ljava.io.IOException;)VLjava.lang.Override;;;; EM1;NreadObject;(M200000000;Ljava.lang.String;NpPanelName;M200000000;ZNpStrong;)(Ljava.io.IOException;)REfiValueMap;;; EM1;Nrefresh;(M200000000;ZNpStrong;)(Ljava.io.IOException;)V;; EM1;NrefreshActionState;()()VLjava.lang.Override;;;; EM1;NrefreshMenuActionList;(M200000000;Lse.grim.doi.action.DoiActionList;NpActionList;)()VLjava.lang.Override;;;; EM1;NresetView;()(Ljava.io.IOException;)VLjava.lang.Override;;;; EM1;NresetViewCopy;()(Ljava.io.IOException;)V;; EM1;NsaveView;()(Ljava.io.IOException;)VLjava.lang.Override;;;; EM4;NsetupView;()()V;; EM1;NviewActivated;()(Ljava.io.IOException;)VLjava.lang.Override;;;; EM1;NviewActivated;(M200000000;Lse.grim.doi.view.DoiSubView;NpSubView;)(Ljava.io.IOException;)VLjava.lang.Override;;;; EM1;NviewClosed;(M200000000;Lse.grim.doi.view.DoiTopView;NpView;)()VLjava.lang.Override;;;; EM1;NviewSaved;(M200000000;ZNpNew;)(Ljava.io.IOException;)V;; WR;;; ----- Source file content: ---------------------------------------- package se.grim.doi.view; import java.awt.*; import java.awt.event.*; import java.beans.*; import java.io.*; import java.util.*; import java.util.List; import java.util.prefs.*; import javax.swing.*; import javax.swing.filechooser.FileFilter; import org.w3c.dom.*; import se.grim.doi.action.*; import se.grim.doi.bookmark.*; import se.grim.doi.controller.*; import se.grim.doi.model.*; import se.grim.doi.print.*; import se.grim.doi.security.*; import se.grim.doi.util.*; import se.grim.doi.widget.*; import se.grim.effie.apt.beaninfo.*; import se.grim.effie.io.*; import se.grim.effie.value.*; import static se.grim.doi.controller.DoiObjectBrowsable.*; /** * A top view for presentation and editing of a domain object. Contains an object * key that identifies the current object. * * @author Copyright © Gunnar Grim * @since 4.0 * @version 4.4 */ @EfiJavaBean( displayName="Object View", shortDescription="Presentation and editing of an object.", isContainer=true, defaultProperty="name") public class DoiObjectView extends DoiBinderView implements DoiOpenWithHandler { //////////////////////////////////////////////////////////////////////////////// // Constants and variables. /** * Feature constant indicating that the "File/New Copy" command should be available in the menu. * Initially false. * @since 4.3 */ public static final int FEATURE_NewCopy = 20; /** * Property name for the current object key. * @since 4.0 */ public static String PROPERTY_ObjectKey = "objectKey"; /** * Indicates if the view is currently loading values for a new copy. Queried by {@link DoiComponentSupport} * to allow it to clear or lock a component instead of setting its value. */ private boolean itsLoadingNewCopy; /** * The current object key. May be empty and new but never null. */ private DoiObjectKey itsObjectKey; /** * The object key for the object being copied when New Copy is used, or null. */ private DoiObjectKey itsObjectKeyCopy; /** * The object key of the next object to open, after a delete. Normally null. */ private DoiObjectKey itsObjectKeyNext; /** * The selection view attached to this object view, or null. */ private DoiSelectionView itsSelectionView; /** * The browsable attached to this object view, or null. */ private DoiObjectBrowsable itsBrowsable; //////////////////////////////////////////////////////////////////////////////// // Constructors. /** * Construct a new object view. * @since 4.0 */ public DoiObjectView() { itsObjectKey = new DoiObjectKey(); } /** * Construct a new object view attached to the specified binder. * @param pBinder The binder used by the view. * @since 4.0 */ public DoiObjectView(DoiBinder pBinder) { this(); setFeature(FEATURE_FileExport, true); setHelpID("object-view"); setBinder(pBinder); setupView(); } //////////////////////////////////////////////////////////////////////////////// // Property accessors and mutators. /** * Return the active object panel. * @return The most recently activated object panel, or null if no * panels has been added yet. * @since 4.0 */ public DoiObjectPanel getActiveObjectPanel() { return (DoiObjectPanel)getActiveSubView(); } /** * Return the view or component that handles browsing. Usually this is the selection view. * @return The view, or null. * @since 4.0 */ public DoiObjectBrowsable getBrowsable() { if (itsBrowsable != null) return itsBrowsable; return itsSelectionView; } /** * Set the view or component that handles browsing. Unless set the selection view is used. * @param pBrowsable The browsable, or null. * @since 4.0 */ public void setBrowsable(DoiObjectBrowsable pBrowsable) { itsBrowsable = pBrowsable; refreshActionState(); } /** * Test if the state of this view is {@link DoiComponent#DIRTY}. * Overridden to return true for new copies. * @return true if the view is dirty. * @see #getState * @since 4.3 */ public boolean isDirty() { return getSupport().getState() == DoiComponent.DIRTY || itsObjectKeyCopy != null; } /** * Test if the view is currently loading values for a new copy. Used by {@link DoiComponentSupport#propagateValueDown} * to allow it to clear or lock a component instead of setting its value. * @since 4.3 */ public boolean isLoadingNewCopy() { return itsLoadingNewCopy; } /** * Return the object key. An object view will always have an object key, even if * it is in the "New" state. In that case the key may be empty. * @return The object key. * @since 4.0 */ public DoiObjectKey getObjectKey() { return itsObjectKey; } /** * Return the object key of the object being copied during New Copy. * @return The object key, or null. * @since 4.3 */ public DoiObjectKey getObjectKeyCopy() { return itsObjectKeyCopy; } /** * Set the object key. This does not cause a new object to be * fetched. For this to happen, {@link #refresh} must be called. * @param pObjectKey The object key identifying the object to view. * @since 4.0 */ public void setObjectKey(DoiObjectKey pObjectKey) { if (pObjectKey == null) throw new IllegalArgumentException("The object key is null."); DoiObjectKey old = itsObjectKey; itsObjectKey = pObjectKey; firePropertyChange(PROPERTY_ObjectKey, old, pObjectKey); } /** * Return the specified object panel. Delegates to {@link DoiTopView#getSubView(String)}. * @param pName The component name of the panel. * @return The object panel. * @throws NoSuchElementException If the panel doesn't exist. * @since 4.0 * @changed 4.4 */ public DoiObjectPanel getObjectPanel(String pName) throws NoSuchElementException { return (DoiObjectPanel)getSubView(pName); } /** * Return the specified object panel. Delegates to {@link DoiTopView#getSubView(Class)}. * @param pType The panel type. * @return The panel. * @throws NoSuchElementException If no such panel exist. * @since 4.4 */ public T getObjectPanel(Class pType) throws NoSuchElementException { return getSubView(pType); } /** * Return the specified object panel. Delegates to {@link DoiTopView#getSubView(int)}. * @param pIndex The 0-based panel index. * @return The object panel. * @throws NoSuchElementException If the panel doesn't exist. * @since 4.3 * @changed 4.4 */ public DoiObjectPanel getObjectPanel(int pIndex) throws NoSuchElementException { return (DoiObjectPanel)getSubView(pIndex); } /** * Return the selection view attached to this object view. * @return The view, or null. * @since 4.0 */ public DoiSelectionView getSelectionView() { return itsSelectionView; } /** * Attach this object view to the specified selection view. Invoked by the selection * view when the object view is opened from it. Also called by {@link #viewClosed(DoiTopView)} * when the selection view is closed, to detach it. * @param pSelectionView The view, or null. * @since 4.0 */ public void setSelectionView(DoiSelectionView pSelectionView) { if (itsSelectionView == pSelectionView) return; itsSelectionView = pSelectionView; refreshActionState(); } /** * Return the user preferences. Returns the node "ObjectView" in the binder * preferences. * @return The preferences. * @since 4.2 */ public EfiValueMap getUserPreferences() { return getBinder().getUserPreferences().map("ObjectView", true); } /** * Set the state of this view. The state {@link #VOID} is propagated downwards to * all object panels, while the state {@link #CLEAN} is propagated downwards to * object panels that are dirty, but not to panels that are void. * @param pState The new state. * @return true if the state was changed. * @since 4.0 */ public boolean setState(int pState) { int oldState = getState(); if (!getSupport().setStateNoPropagation(pState)) return false; if (pState == VOID) { getSupport().propagateStateDown(pState); } else if (pState == CLEAN) { DoiContainer container = getSubViewContainer(); if (container != null) container.setStateNoPropagation(CLEAN); int n = getSubViewCount(); for (int i = 0; i < n; ++i) { DoiSubView view = getSubView(i); if (view.isDirty()) view.setState(CLEAN); } } stateChanged(oldState, pState); return true; } /** * Return the current view state, as one of the * {@linkplain DoiComponent#VS_NotNew view state constants}. * This state depends on the current object key and the current {@linkplain * DoiView#getState}. * @return The view state. * @since 4.0 */ public int getViewState() { if (itsObjectKey.isNew()) return VS_New; else return isDirty() ? VS_NotNew : VS_Saved; } /** * Return the view type. * @return This implementation returns {@link DoiBinder#VIEWTYPE_Object}. * @since 4.0 */ public String getViewType() { return DoiBinder.VIEWTYPE_Object; } //////////////////////////////////////////////////////////////////////////////// // Operations. /** * Active the specified object panel. * @param pPanelName The symbolic name of the panel to activate. * @throws IOException If an I/O error occurs. * @since 4.4 */ public DoiObjectPanel activatePanel(String pPanelName) throws IOException { return (DoiObjectPanel)activateSubView(pPanelName); } /** * Active the specified object panel. * @param pType The type of the panel to activate. * @throws IOException If an I/O error occurs. * @since 4.4 */ public T activatePanel(Class pType) throws IOException { T panel = getObjectPanel(pType); activateSubView(panel); return panel; } /** * Add the specified object panel. * Invokes {@link DoiTopView#addSubView} to add the panel and possibly creating * a tabbed pane. * Sets the panel name to the value returned by {@link DoiObjectPanel#getPanelName}, * to ensure that all object panel have a name. * Finally checks with the binder if the user has generqal write permission. * If not, it sets the panel to R/O with reason {@link DoiComponent#RO_ObjectType}. * @param pPanel The panel to add. * @since 4.0 * @changed 4.2 */ public void addObjectPanel(DoiObjectPanel pPanel) { addSubView(pPanel); if (!Beans.isDesignTime()) pPanel.setName(pPanel.getPanelName()); if (!permitted(DoiObjectPermission.MASK_WRITE)) pPanel.setReadOnly(DoiComponent.RO_ObjectType, true); } /** * Build the view title. * The default implementation uses the title prefix returned by {@link DoiBinder#getTitleForObject}. Then follows * either the value of the resource string "txtNew" (e g "New") or the value returned by {@link #buildTitleSuffix()}. * @return The title. * @since 4.0 * @changed 4.3 */ protected String buildTitle() { StringBuilder sb = new StringBuilder(); sb.append(getBinder().getTitleForObject()); if (itsObjectKey.isNew()) { sb.append(" - ").append(getBinder().getTextString("txtNew")); } else { String sfx = buildTitleSuffix(); if (sfx != null && sfx.length() != 0) { if (sfx.length() > 50) sfx = sfx.substring(0, 47)+"..."; sb.append(" - ").append(sfx); } } return sb.toString(); } /** * Build the view title suffix. Invoked by {@link #buildTitle} if the object is not new. * The default implementation returns the string representation of the object key. * Concrete object views may override this method if the object key is too technical, and * instead return some more descriptive value such as the object code or name. If that * value is editable by the user, a listener should also be installed to ensure that * {@link DoiBinderView#refreshTitle} is called when the field is changed. * @return The title suffix. * @since 4.0 */ protected String buildTitleSuffix() { return getObjectKey().toString(); } /** * Test if this view can copy contained or selected object or objects to an object clipboard. * Delegates first to the superclass implementation, which checks the last focused component * and its ancestors. If no specific component is found, the result depends on if the object * is new or not. * @return Information about binder and object count, or null. * @since 4.3 */ public DoiObjectCopyInfo canCopyObjects() { DoiObjectCopyInfo ci = super.canCopyObjects(); if (ci != null) return ci; if (!itsObjectKey.isNew()) return new DoiObjectCopyInfo(this, getBinder(), 1); else return null; } /** * Prepare the view for displaying a context menu, and return a list of * actions used to build the menu. Invoked by the context menu controller when * the user requests a context menu. * @param pEvent The triggering event. * @return A list of action items. * @since 4.0 */ public DoiActionList contextMenuRequested(InputEvent pEvent) { DoiActionList list = super.contextMenuRequested(pEvent); list.addItemIfEnabled(getAction("EditCopyObjects"), true); if (!itsObjectKey.isNew() && itsObjectKey.isComplete()) { Set keySet = itsObjectKey.keySet(); String[] names = (String[])keySet.toArray(new String[keySet.size()]); DoiApplication.instance().appendOpenWithActionList(list, names, this, false); } return list; } /** * Copy selected object or objects to the specified object clipboard. * This implementation copies the open object, unless it is new. * @param pClipboard The clipboard. * @throws IOException If an I/O error occurs. * @since 4.3 */ public void copyObjects(DoiObjectClipboard pClipboard) throws IOException { if (!itsObjectKey.isNew()) pClipboard.copyObject(getBinder(), itsObjectKey); } /** * Create a set of actions for this view. Invoked by {@link DoiView#getActionSet} if * the actions hasn't been created yet. * @return A set of actions. * @since 4.0 */ protected DoiActionSet createActionSet() { DoiActionSet actions = super.createActionSet(); if (Beans.isDesignTime()) return actions; DoiAction action; action = createAction("FileNewCopy", null, this); action.setEnabled(false); actions.add(action); return actions; } /** * Create a bookmark using the contents of this view. * @return A bookmark, or null if no bookmark can be created. * @since 4.0 */ protected DoiBookmark createBookmark() { if (itsObjectKey.isNew() || !itsObjectKey.isComplete()) return null; return getApp().getBookmarkManager().createBookmark(getBinder(), (DoiObjectKey)itsObjectKey.clone(), createBookmarkTitle()); } /** * Create the default title for a new bookmark using the contents of this view. * @return A title, or null. * @since 4.0 */ protected String createBookmarkTitle() { return null; } /** * Open an object by prompting the user. A dialog is created using {@link DoiBinder#createPromptObjectDialog} and shown to the user. If the * user confirms, the object is opened using {@link DoiBinder#openObjectView}}. * @param pEvent The action event. * @throws IOException If an I/O error occurs. * @since 4.0 */ public void doActionFileOpen(ActionEvent pEvent) throws IOException { DoiPromptObjectDialog dialog = getBinder().createPromptObjectDialog((DoiTopView)this); if (!getObjectKey().isNew()) { EfiValueMap map = readObject(DoiBinder.PART_Label, false); dialog.setValueMap(map, DIRTY); } dialog.show(); if (!dialog.isConfirmed()) throw new DoiUserAbortException(); DoiObjectKey key = dialog.getObjectKey(); if (key != null) { DoiObjectView objectView = getBinder().openObjectView(key, !DoiAction.isModExtend(pEvent)); } } /** * Open a bookmark in this view, or open a new view with the contents specified by the bookmark if the bookmark * is not an object bookmark. * @param pEvent The action event. * @param pBookmark The bookmark to open. * @throws IOException If an I/O error occurs. * @since 4.0 */ @Override public void doActionBookmarkOpen(ActionEvent pEvent, DoiBookmark pBookmark) throws IOException { if (pBookmark.getViewType() == DoiBinder.VIEWTYPE_Object) { DoiObjectKey key = pBookmark.getObjectKey(); if (key == null || key.equals(getObjectKey())) return; DoiObjectView objectView = getBinder().openObjectView(key, !DoiAction.isModExtend(pEvent)); } else { if (itsSelectionView == null || DoiAction.isModExtend(pEvent)) { setSelectionView(getBinder().openSelectionView(pBookmark.getSelectionCriteria())); } else { itsSelectionView.setSelectionCriteria(pBookmark.getSelectionCriteria()); itsSelectionView.refresh(false); itsSelectionView.showView(); refreshActionState(); } } } /** * Browse to some object. Invoked by the {@link DoiBinderView#doActionBrowseFirst doActionBrowseXxx}-methods. * @param pEvent The action event. * @param pBrowseDir One of the {@link DoiObjectBrowsable#BROWSE_First BROWSE}-constants. * @throws IOException If an I/O error occurs. * @since 4.0 */ public void doActionBrowse(ActionEvent pEvent, int pBrowseDir) throws IOException { DoiObjectBrowsable browsable = getBrowsable(); if (browsable == null) return; boolean first = false, last = false, prev = false, next = false; int rowNo = browsable.findObjectRowNo(getBinder(), getObjectKey()); switch (pBrowseDir) { case BROWSE_First : rowNo = browsable.findObjectRowNo(getBinder(), 0, BROWSE_Next); break; case BROWSE_Last : rowNo = browsable.findObjectRowNo(getBinder(), browsable.getRowCount()-1, BROWSE_Prev); break; case BROWSE_Prev : if (rowNo != -1) rowNo = browsable.findObjectRowNo(getBinder(), rowNo-1, BROWSE_Prev); break; case BROWSE_Next : if (rowNo != -1) rowNo = browsable.findObjectRowNo(getBinder(), rowNo+1, BROWSE_Next); break; } if (rowNo == -1) return; DoiObjectKey key = browsable.getObjectKey(getBinder(), rowNo); if (key == null || key.equals(getObjectKey())) return; DoiObjectView view = getBinder().findObjectView(key); if (view != null && view != this) { view.showView(); } else { promptSaveView(); try { getApp().waitCursorOn(); setObjectKey(key); refresh(false); } finally { getApp().waitCursorOff(); } } browsable.setSelectedRowNo(rowNo); } /** * Delete the open object after user confirmation. The view is not affected since that is handled by * global notification, see {@link #objectDeleted}. * @param pEvent The action event. * @throws IOException If an I/O error occurs. * @since 4.0 */ public void doActionFileDelete(ActionEvent pEvent) throws IOException { if (getViewState() == VS_New) return; showView(); if (JOptionPane.showConfirmDialog(this, getApp().getTextString("msgDeleteObject"), getTitle(), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) != JOptionPane.OK_OPTION) throw new DoiUserAbortException(); // Locate the next object to open. itsObjectKeyNext = null; if (itsSelectionView != null) { int rowNo = itsSelectionView.findObjectRowNo(getBinder(), getObjectKey()); if (rowNo != -1) rowNo = itsSelectionView.findObjectRowNo(getBinder(), rowNo+1, BROWSE_Next); if (rowNo != -1) { DoiObjectKey key = itsSelectionView.getObjectKey(rowNo); if (key != null && !key.equals(getObjectKey())) itsObjectKeyNext = key; } } // Delete this object, which will cause objectDeleted to be called. try { getBinder().deleteObject(this, itsObjectKey); } finally { itsObjectKeyNext = null; } } /** * Export the object or objects visible in this view. * The user is prompted for a target file. The file is created and {@link #exportObjects} is invoked. * The default export directory is fetched from the user preference "ExportDir" on binder level, i e * all views within the binder share the same default directory. This preference is updated if the user confirms * the export. * @param pEvent The action event. * @throws IOException If an I/O error occurs. * @since 4.0 * @changed 4.1 */ public void doActionFileExport(ActionEvent pEvent) throws IOException { promptSaveView(); try { DoiFileChooser fc = exportFileChooser(); File file = fc.chooseFileSave(); if (file == null) throw new DoiUserAbortException(); OutputStream output = new BufferedOutputStream(new FileOutputStream(file)); try { exportObjects(fc.getSelectedFileFilterName(), output, fc.getSelectedFileType()); } finally { output.close(); } } catch (IOException ex) { throw ex; } catch (Exception ex) { throw new EfiGenericIOException(ex); } } /** * Prepare this object view for a new object, or open a new view. * If the shift key is held down, a new view is opened by invoking {@link DoiBinder#openObjectView(DoiObjectKey, boolean)} * with a new empty object key and false for the reuse flag. * Otherwise {@link DoiTopView#promptSaveView} and {@link #resetView} is invoked with the wait cursor active. * @param pEvent The action event. * @throws IOException If an I/O error occurs. * @since 4.0 * @changed 4.3 */ public void doActionFileNew(ActionEvent pEvent) throws IOException { if (DoiAction.isModExtend(pEvent)) { getBinder().openObjectView(new DoiObjectKey(true), false); return; } try { getApp().waitCursorOn(); promptSaveView(); resetView(); } finally { getApp().waitCursorOff(); } } /** * Prepare this object view for a new copy of the current object. * @param pEvent The action event. * @throws IOException If an I/O error occurs. * @since 4.3 */ public void doActionFileNewCopy(ActionEvent pEvent) throws IOException { try { getApp().waitCursorOn(); promptSaveView(); resetViewCopy(); } finally { getApp().waitCursorOff(); } } /** * Open or activate the criteria view. This implementation first invokes {@link #doActionViewSelection}, and then * delegates to the selection view. * @param pEvent The action event. * @throws IOException If an I/O error occurs. * @since 4.0 */ public void doActionViewCriteria(ActionEvent pEvent) throws IOException { if (itsSelectionView != null) { doActionViewSelection(pEvent); itsSelectionView.doActionViewCriteria(pEvent); } else { DoiCriteriaView view = (DoiCriteriaView)getOperationView(DoiBinder.OPER_Criteria); if (view != null) view.showView(); else getBinder().openCriteriaView().setOwnerView(this); } } /** * Open or activate the selection view. This implementation activates the attached selection view, if any, * or opens and attaches a new view. * @param pEvent The action event. * @throws IOException If an I/O error occurs. * @since 4.0 * @changed 4.3 */ public void doActionViewSelection(ActionEvent pEvent) throws IOException { if (itsSelectionView != null) itsSelectionView.showView(); else { setSelectionView(getBinder().openSelectionView()); DoiCriteriaView view = (DoiCriteriaView)getOperationView(DoiBinder.OPER_Criteria); if (view != null) view.setSelectionView(itsSelectionView); } } /** * Ensure that all object panels are populated. Delegates to {@link DoiObjectPanel#ensurePopulated} for each * panel. * @throws IOException If an I/O error occurs. * @since 4.0 */ public void ensurePopulated() throws IOException { int n = getSubViewCount(); for (int i = 0; i < n; ++i) { DoiObjectPanel op = (DoiObjectPanel)getSubView(i); op.ensurePopulated(); } } /** * Create and configure a file chooser for exporting the object to a file. * The default implementation adds a file filter for selection table and, if any object is selected, * also for object export. * Override to add additional file filters. * @throws IOException If an I/O exception occurs. * @since 4.4 */ protected DoiFileChooser exportFileChooser() throws IOException { DoiFileChooser fc = new DoiFileChooser(this, getApp().getTextString("cmdFileExport")); DoiExtensionFileFilter objFilter = fc.addFileFilter("Object", getApp().getTextString("txtFileFilterDOBJX")); fc.setPrefsKey(getBinder().getUserPreferences(), "Export"); fc.setDefaultFileFilter(objFilter); return fc; } /** * Export the object or objects visible in this view. * This implementation delegates to {@link DoiBinder#exportObjects}. * @param pOutput The target output stream. * @param pExportType Export type if applicable. Passed to {@link DoiBinder#exportObjects} and can be used to handle * exports with different amounts of data. * @param pFileType The file type, e g "dobjx" or "csv". * @throws IOException If an I/O error occurs. * @since 4.0 */ @Override public void exportObjects(String pExportType, OutputStream pOutput, String pFileType) throws IOException { getBinder().exportObjects(new DoiObjectKey[] { getObjectKey() }, pExportType, pOutput, pFileType); } /** * Invoked when an object has been deleted. If it is the open object, this view is normally voided and then closed. * If however, the object was deleted from this view, then {@link #doActionFileDelete} might have already located a next * object which is opened. * @throws IOException If an I/O error occurs. * @since 4.0 */ @Override public void objectDeleted(DoiBinder pBinder, DoiObjectKey pObjectKey) throws IOException { super.objectDeleted(pBinder, pObjectKey); if (getViewState() == VS_New || pBinder != getBinder() || !itsObjectKey.equals(pObjectKey)) return; // The open object has been deleted. Browse to the next one or close the view. setState(VOID); if (itsObjectKeyNext != null) { setObjectKey(itsObjectKeyNext); refresh(false); SwingUtilities.invokeLater(new Runnable() { public void run() { refreshActionState(); } }); } else { closeView(); } } /** * Open the specified object in this view and show it. If the object key specified is equal to the * key for the currently open object, then nothing happens except that the view is brought to the * top. Otherwise, the user is first prompted to save any changes. Then the object key is set and * {@link #refresh} is called. The wait cursor is active during all this. * @param pObjectKey The object key. * @throws IOException If an I/O error occurs. * @since 4.0 */ public void openObject(DoiObjectKey pObjectKey) throws IOException { openObject(pObjectKey, null); } /** * Open the specified object in this view and show it. If the object key specified is equal to the * key for the currently open object, then nothing happens except that the view is brought to the * top. Otherwise, the user is first prompted to save any changes. Then the object key is set and * {@link #refresh} is called. The wait cursor is active during all this. * @param pObjectKey The object key. * @param pLocation The location if a new frame is created, or null to calculate. * @throws IOException If an I/O error occurs. * @since 4.4 */ public void openObject(DoiObjectKey pObjectKey, Point pLocation) throws IOException { if (pObjectKey == null) throw new IllegalArgumentException("The object key is null."); itsObjectKeyCopy = null; if (pObjectKey.equals(itsObjectKey)) { showView(pLocation); return; } try { getApp().waitCursorOn(); promptSaveView(); setObjectKey(pObjectKey); refresh(false); } finally { getApp().waitCursorOff(); } showView(pLocation); } /** * Invoked by a {@link DoiOpenWithAction} when the action is performed. * Builds an object key or a selection criteria using the field value * and delegates to {@link DoiBinder#openObjectView} or * {@link DoiBinder#openSelectionView}. * @param pAction The action. * @param pEvent The action event. * @throws IOException If an I/O error occurs. * @since 4.0 */ public void openWith(DoiOpenWithAction pAction, ActionEvent pEvent) throws IOException { DoiObjectKey key = getObjectKey(); if (key.isNew() || !key.isComplete()) return; DoiBinder binder = pAction.getBinder(); if (pAction.getViewType() == DoiBinder.VIEWTYPE_Object) { binder.openObjectView(key, !DoiAction.isModExtend(pEvent)); } else if (key.size() == 1) { DoiSelectionCriteria cr = binder.createSelectionCriteria(DoiBinder.VIEWTYPE_Selection); cr.setFilterCondition(key.toExpression()); cr.setTitle(DoiApplication.instance().getTextString("lblSelection")); cr.setViewValues(EfiValues.map(pAction.getSchemaName(), "="+key)); // TODO: Let the QBE Parser format the value. binder.openSelectionView(cr); } } /** * Create and return a list containing all applicable reports for this view. * Invoked when a {@link DoiPrintView} is created and possibly * whenever the selection is changed in this view. * The list contents may depend on the current selection. * Overridden to return only binder views if the current object is new. * @param pPrintView The print view that requests the list from the binder view. * @return A list containing {@link DoiReport} objects. * @since 4.0 * @changed 4.4 */ @Override public List reportList(DoiPrintView pPrintView) { if (getObjectKey().isNew()) return new ArrayList(getBinder().getReportMap(DoiBinder.VIEWTYPE_Binder).values()); else return super.reportList(pPrintView); } /** * Print the contents of this view. * If the source type is {@link DoiReport#SOURCETYPE_Application} this method delegates to * {@link DoiBinder#printReport}, otherwise it sets up report parameters and invokes * {@link DoiBinder#printObjects} with the open object key. * @param pReport The report to print. * @param pDestType One of the {@link DoiPrintSupport#DEST_Printer DEST_Printer} constants. * @param pDestination Destination type specific. * @throws IOException If an I/O error occurs. * @since 4.0 * @changed 4.4 */ @Override public void printView(DoiReport pReport, int pDestType, Object pDestination) throws IOException { if (pReport.getSourceType() == DoiReport.SOURCETYPE_Application) { getBinder().printReport(pReport, pDestType, pDestination, this); return; } EfiValueMap parameters = EfiValues.map(); EfiValueMap reportPars = pReport.getParameters(); if (reportPars != null) parameters.putAll(reportPars); parameters.setString(DoiPrintSupport.PARAM_ReportTitle, getTitle()); getBinder().printObjects(pReport, parameters, new DoiObjectKey[] { getObjectKey() }, pDestType, pDestination); } /** * Read information from the open object. * @param pPanelName The name of the target object panel. * @param pStrong true to bypass any client side cache. * @return The object value map. * @throws IOException If an I/O error occurs. * @since 4.4 */ public EfiValueMap readObject(String pPanelName, boolean pStrong) throws IOException { return getBinder().readObject(getObjectKey(), pPanelName, pStrong); } /** * Refresh the contents of this view, without prompting the user. The steps are as following: *
    *
  1. This view and all subviews are voided.
  2. *
  3. This view is set to clean.
  4. *
  5. Read-only reason {@link DoiComponent#RO_NewCopyLocked} is removed from all panels.
  6. *
  7. The active object panel is {@linkplain DoiObjectPanel#refresh refreshed}.
  8. *
  9. The view state dependent availablility is {@linkplain #refreshAvailableWhen refreshed}.
  10. *
  11. Action states are {@linkplain #refreshActionState refreshed}.
  12. *
      * @param pStrong true to bypass any client side cache. * @throws IOException If an I/O error occurs. * @since 4.0 * @changed 4.4 */ public void refresh(boolean pStrong) throws IOException { setState(VOID); setState(CLEAN); int panelCount = getSubViewCount(); for (int i = 0; i < panelCount; ++i) { DoiObjectPanel panel = getObjectPanel(i); panel.setReadOnly(RO_NewCopyLocked, false); } DoiObjectPanel panel = getActiveObjectPanel(); if (panel != null) { panel.refresh(pStrong); } else { EfiValueMap map = readObject(DoiBinder.PART_General, pStrong); setValue(map, CLEAN); } refreshTitle(); refreshAvailableWhen(getViewState()); refreshActionState(); } /** * Refresh the enabled/disabled state of the actions of this view. * This implementation sets the state of the following actions: *
        *
      • BrowseXxx - Enabled if a selection view is attached.
      • *
      • FileNew - Enabled if the user is permitted to create.
      • *
      • FileNewCopy - Enabled if the feature is enabled, the view is not new and the user is permitted to create.
      • *
      • FileDelete - Enabled if the current object isn't new and the user is permitted to delete.
      • *
      • EditCopyObjects - Enabled if the current object isn't new.
      • *
      • EditPasteObjects - Enabled if {@link #canPasteObjects} returns true.
      • *
      • ViewSelection - If this view is attached to a selection view.
      • *
      • ViewCriteria - If this view is attached to a selection view and that selection view has the same action enabled.
      • *
      . * @since 4.0 * @changed 4.3 */ @Override public void refreshActionState() { super.refreshActionState(); DoiObjectBrowsable browsable = getBrowsable(); boolean first = false, last = false, prev = false, next = false; int viewState = getViewState(); if (browsable != null) { int firstRowNo = browsable.findObjectRowNo(getBinder(), 0, BROWSE_Next); int lastRowNo = browsable.findObjectRowNo(getBinder(), browsable.getRowCount()-1, BROWSE_Prev); int thisRowNo = browsable.findObjectRowNo(getBinder(), getObjectKey()); first = firstRowNo != -1 && firstRowNo != thisRowNo; last = lastRowNo != -1 && lastRowNo != thisRowNo; prev = thisRowNo != -1 && firstRowNo != thisRowNo; next = thisRowNo != -1 && lastRowNo != thisRowNo; browsable.setSelectedRowNo(thisRowNo); } getAction("BrowseFirst").setEnabled(first); getAction("BrowsePrev").setEnabled(prev); getAction("BrowseNext").setEnabled(next); getAction("BrowseLast").setEnabled(last); getAction("FileNew").setEnabled(permitted(DoiObjectPermission.MASK_CREATE)); getAction("FileNewCopy").setEnabled( viewState != VS_New && hasFeature(FEATURE_NewCopy) && permitted(DoiObjectPermission.MASK_CREATE)); getAction("FileDelete").setEnabled( viewState != VS_New && permitted(DoiObjectPermission.MASK_DELETE)); if (getApp().getPrintSupport().isPrintingSupported()) { boolean print = reportCount() > 0 && !getObjectKey().isNew(); getAction("FilePrint").setEnabled(print); if (getApp().getPrintSupport().isPreviewSupported()) getAction("FilePrintPreview").setEnabled(print); } getAction("ViewSelection").setEnabled(getBinder().hasFeature(DoiBinder.FEATURE_SelectionView)); getAction("ViewCriteria").setEnabled(getBinder().hasFeature(DoiBinder.FEATURE_CriteriaView)); } /** * Refresh the specified menu action list. Invoked for each list when the menu is initially built and when a * single menu is refreshed. On entry, the list is empty. * This implementation augments the standard menus "File", through "Help", adding actions suitable * for binder views. * Subclasses should either override this method to handle additional menus. * @param pActionList The action list. * @since 4.0 */ @Override public void refreshMenuActionList(DoiActionList pActionList) { super.refreshMenuActionList(pActionList); String menuName = pActionList.getName().intern(); if ("File" == menuName) { pActionList.insertItemAfter("FileSaveAll", getAction("FileDelete"), true, true); if (hasFeature(FEATURE_NewCopy)) pActionList.insertItemAfter("FileNew", getAction("FileNewCopy"), false, false); } } /** * Reset the contents of this view to prepare it for editing a new object. * The steps are as following: *
        *
      1. This view and all subviews are voided.
      2. *
      3. This view is set to clean.
      4. *
      5. The object key is set to a new empty key.
      6. *
      7. The first object panel is activated and {@linkplain DoiObjectPanel#refresh refreshed}.
      8. *
      9. The view state dependent availablility is {@linkplain #refreshAvailableWhen refreshed}.
      10. *
          * @throws IOException If an I/O error occurs. * @since 4.0 */ @Override public void resetView() throws IOException { itsObjectKeyCopy = null; setState(VOID); setState(CLEAN); setObjectKey(new DoiObjectKey(true)); int panelCount = getSubViewCount(); if (panelCount > 0) { activateSubView(0); } else { EfiValueMap map = readObject(DoiBinder.PART_General, false); setValue(map, PRESET); } for (int i = 0; i < panelCount; ++i) { DoiObjectPanel panel = getObjectPanel(i); panel.setReadOnly(RO_NewCopyLocked, false); } refreshAvailableWhen(getViewState()); refreshActionState(); refreshTitle(); requestInitialFocus(); } /** * Reset the contents of this view to prepare it for editing a new object, which is a copy of the current. * The steps are as following: *
            *
          1. This view and all subviews are voided.
          2. *
          3. This view is set to clean.
          4. *
          5. The object key is set to a new empty key.
          6. *
          7. The first object panel is activated and {@linkplain DoiObjectPanel#refresh refreshed}.
          8. *
          9. The view state dependent availablility is {@linkplain #refreshAvailableWhen refreshed}.
          10. *
              * @throws IOException If an I/O error occurs. * @since 4.3 */ public void resetViewCopy() throws IOException { // Reset the view. setState(VOID); setState(CLEAN); // Switch keys. itsObjectKeyCopy = itsObjectKey; setObjectKey(new DoiObjectKey(true)); // Set the LoadingNewCopy state and fill, clear or lock all panels. try { itsLoadingNewCopy = true; int panelCount = getSubViewCount(); // Load all panels that has default NewCopy behavior. for (int i = 0; i < panelCount; ++i) { DoiObjectPanel panel = getObjectPanel(i); switch (panel.getNewCopy()) { case NC_Default : EfiValueMap map = getBinder().readObject(itsObjectKeyCopy, panel.getPanelName(), true); panel.setState(CLEAN); panel.setValue(map, PRESET); break; case NC_Cleared : panel.refresh(true); break; case NC_Locked : panel.setReadOnly(RO_NewCopyLocked, true); break; } } // Make sure panel 0 is active or the view itself is loaded if no subviews are used. if (panelCount > 0) { activateSubView(0); } else { EfiValueMap map = getBinder().readObject(itsObjectKeyCopy, null, false); setValue(map, PRESET); } } finally { itsLoadingNewCopy = false; } // Finish. refreshAvailableWhen(getViewState()); refreshActionState(); refreshTitle(); requestInitialFocus(); } /** * Save the contents of this view. * The steps are as following: *
                *
              1. Any ongoing edits are committed to the value model
              2. *
              3. This view and all subviews are validated. See {@link DoiComponent#validateValue()}.
              4. *
              5. If the view is clean, the method returns.
              6. *
              7. Edited field values from this view and all subviews are collected into a value * map, using {@link DoiView#collectValues}. *
              8. The map is sent to the binder, using either {@link DoiBinder#writeObject} or * {@link DoiBinder#createObject}, depending on if the key indicated that the * object was new.
              9. *
              10. If a new object was created, the object key is replaced with the one returned * by {@link DoiBinder#createObject}. *
              11. Then {@link DoiObjectView#viewSaved} is invoked, which caused all panels * but the active one to be voided, and also ensures that the active panel shows * values from the latest version of the object.
              12. *
                  * @throws IOException If an I/O error occurs. * @since 4.0 * @changed 4.3 */ @Override public void saveView() throws IOException { commitEdits(); validateValue(); if (!isDirty()) return; EfiValueMap values = collectValues(null, true); boolean isNew = itsObjectKey.isNew(); if (isNew) { DoiObjectKey newKey; if (itsObjectKeyCopy == null) newKey = getBinder().createObject(itsObjectKey, values); else newKey = getBinder().createObjectCopy(itsObjectKey, itsObjectKeyCopy, values); setObjectKey(newKey); } else { getBinder().writeObject(itsObjectKey, values); } itsObjectKeyCopy = null; viewSaved(isNew); } /** * Set up the view by adding object panels. Invoked by the constructor * {@link #DoiObjectView(DoiBinder)}. The default implementation enables actions. * Override to add panels and actions. * @since 4.0 */ protected void setupView() { if (permitted(DoiObjectPermission.MASK_CREATE)) getAction("FileNew").setEnabled(true); getAction("FileOpen").setEnabled(true); } /** * Invoked when the view is activated. Overridden to refresh the action state. * @throws IOException If an I/O error occurs. * @since 4.0 */ @Override public void viewActivated() throws IOException { super.viewActivated(); refreshActionState(); } /** * Invoked by a subview when it is activated. Overridden to refresh the action state. * @param pSubView The view that was activated. * @throws IOException If an I/O error occurs. * @since 4.0 */ @Override public void viewActivated(DoiSubView pSubView) throws IOException { super.viewActivated(pSubView); refreshActionState(); } /** * Invoked by the desktop when another view has been closed. * Overridden to clear any references to the view. * @param pView The view that was closed. * @since 4.0 */ @Override public void viewClosed(DoiTopView pView) { super.viewClosed(pView); if (pView == itsSelectionView) setSelectionView(null); if (pView == itsBrowsable || (itsBrowsable != null && SwingUtilities.isDescendingFrom((Component)itsBrowsable, pView))) setBrowsable(null); } /** * Invoked when the view has been saved. First, {@link #refresh(boolean)} is invoked. * Then, if a target for new lookup values has been set, values are extracted from the * object key and first panel, and the target field is updated. * @param pNew Indicates if the object was new. * @throws IOException If an I/O error occurs. * @since 4.3 */ public void viewSaved(boolean pNew) throws IOException { int panelCount = getSubViewCount(); for (int i = 0; i < panelCount; ++i) getObjectPanel(i).viewSaved(pNew); refresh(true); DoiTextField newLookupTarget = getNewLookupTarget(); if (pNew && newLookupTarget != null) { Set lookupNames = newLookupTarget.lookupSchemaNames(); DoiObjectPanel panel = getObjectPanel(0); panel.ensurePopulated(); EfiValueMap panelValues = (EfiValueMap)panel.getValue(); EfiValueMap lookupValues = EfiValues.map(); for (String name : lookupNames) { Object value = itsObjectKey.getObject(name); if (value == null) value = panelValues.getObject(name); lookupValues.setObject(name, value); } newLookupTarget.updateLookupValues(lookupValues); } setNewLookupTarget(null); } } ----- Tree: ------------------------------------------------------- public EfiValueMap getUserPreferences() { return getBinder().getUserPreferences().map("ObjectView", true); } ----- Coupling Error: --------------------------------------------- com.sun.tools.javac.util.CouplingAbort at com.sun.tools.javac.comp.MemberEnter.visitMethodDef(MemberEnter.java:650) at com.sun.tools.javadoc.JavadocMemberEnter.visitMethodDef(JavadocMemberEnter.java:65) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:658) at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:416) at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:428) at com.sun.tools.javac.comp.MemberEnter.finishClass(MemberEnter.java:438) at com.sun.tools.javac.comp.MemberEnter.finish(MemberEnter.java:1112) at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:1079) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:402) at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:785) at com.sun.tools.javac.comp.Enter.complete(Enter.java:581) at org.netbeans.api.java.source.JavaSource$ErrorHandlingJavadocEnter.main(JavaSource.java:1141) at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:840) at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:357) at org.netbeans.modules.java.source.TreeLoader.loadTreeFor(TreeLoader.java:99) at com.sun.tools.javac.model.JavacElements.getTreeAndTopLevel(JavacElements.java:627) at com.sun.tools.javac.model.JavacElements.getTreeAndTopLevel(JavacElements.java:653) at com.sun.tools.javac.api.JavacTrees.getPath(JavacTrees.java:168) at com.sun.tools.javac.api.JavacTrees.getPath(JavacTrees.java:160) at org.netbeans.modules.editor.java.GoToSupport$1.run(GoToSupport.java:245) at org.netbeans.modules.editor.java.GoToSupport$1.run(GoToSupport.java:132) at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:613) at org.netbeans.modules.editor.java.GoToSupport.performGoTo(GoToSupport.java:131) at org.netbeans.modules.editor.java.GoToSupport.goTo(GoToSupport.java:296) at org.netbeans.modules.java.editor.hyperlink.JavaHyperlinkProvider.performClickAction(JavaHyperlinkProvider.java:79) at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.performAction(HyperlinkOperation.java:253) at org.netbeans.lib.editor.hyperlink.HyperlinkOperation.mouseClicked(HyperlinkOperation.java:396) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252) at java.awt.Component.processMouseEvent(Component.java:6041) at javax.swing.JComponent.processMouseEvent(JComponent.java:3260) at java.awt.Component.processEvent(Component.java:5803) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3995) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2429) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)