001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.uml.ui.support.finddialog;
043:
044: import org.netbeans.modules.uml.core.metamodel.core.foundation.IElement;
045: import org.netbeans.modules.uml.core.metamodel.diagrams.IProxyDiagram;
046: import org.netbeans.modules.uml.core.metamodel.structure.IProject;
047:
048: public interface IFindController {
049: /**
050: * Display the find dialog
051: */
052: public void showFindDialog();
053:
054: /**
055: * Gets/Sets the scope of the find dialog - Project or Workspace
056: */
057: public int getScope();
058:
059: /**
060: * Gets/Sets the scope of the find dialog - Project or Workspace
061: */
062: public void setScope( /* FindDialogScope */int value);
063:
064: /**
065: * Gets/Sets the string for the search, what was typed by user
066: */
067: public String getSearchString();
068:
069: /**
070: * Gets/Sets the string for the search, what was typed by user
071: */
072: public void setSearchString(String value);
073:
074: /**
075: * Whether or not the search is an advanced xpath search or not
076: */
077: public int getKind();
078:
079: /**
080: * Whether or not the search is an advanced xpath search or not
081: */
082: public void setKind( /* FindDialogKind */int value);
083:
084: /**
085: * Whether or not the search should be case sensitive
086: */
087: public boolean getCaseSensitive();
088:
089: /**
090: * Whether or not the search should be case sensitive
091: */
092: public void setCaseSensitive(boolean value);
093:
094: /**
095: * The value to use for the replace
096: */
097: public String getReplaceString();
098:
099: /**
100: * The value to use for the replace
101: */
102: public void setReplaceString(String value);
103:
104: /**
105: * Whether or not the controller is in replace mode
106: */
107: public boolean getIsReplace();
108:
109: /**
110: * Whether or not the controller is in replace mode
111: */
112: public void setIsReplace(boolean value);
113:
114: /**
115: * Perform the search and populate the passed in results object with what is found
116: */
117: public void search(IFindResults pResults);
118:
119: /**
120: * Display the replace dialog
121: */
122: public void showReplaceDialog();
123:
124: /**
125: * Navigate to the presentation of this element
126: */
127: public boolean navigateToElement(IElement pElement);
128:
129: /**
130: * What to search - elements, descriptions
131: */
132: public int getResultType();
133:
134: /**
135: * What to search - elements, descriptions
136: */
137: public void setResultType( /* FindDialogType */int value);
138:
139: /**
140: * Add the project to the list of projects to search
141: */
142: public void addToProjectList(String newVal);
143:
144: /**
145: * Clear out our list of projects to search
146: */
147: public void clearProjectList();
148:
149: /**
150: * Perform the replace on the passed in results object
151: */
152: public void replace(IFindResults pResults);
153:
154: /**
155: * Whether or not the alias field should also be searched
156: */
157: public boolean getSearchAlias();
158:
159: /**
160: * Whether or not the alias field should also be searched
161: */
162: public void setSearchAlias(boolean value);
163:
164: /**
165: * Another search path that provides the project to search
166: */
167: public void search2(IProject pProject, IFindResults pResults);
168:
169: /**
170: * Open the proxy diagram
171: */
172: public boolean navigateToDiagram(IProxyDiagram pDiagram);
173:
174: /**
175: * Whether or not to load all project elements in memory
176: */
177: public boolean getExternalLoad();
178:
179: /**
180: * Whether or not to load all project elements in memory
181: */
182: public void setExternalLoad(boolean value);
183:
184: /**
185: * Whether or not the user has cancelled out of the find
186: */
187: public boolean getCancelled();
188:
189: /**
190: * Whether or not the user has cancelled out of the find
191: */
192: public void setCancelled(boolean value);
193:
194: /**
195: * The find or the replace dialog window that is active
196: */
197: public long getActiveWindow();
198:
199: /**
200: * The find or the replace dialog window that is active
201: */
202: public void setActiveWindow(long value);
203:
204: /**
205: * Whether or not the whole word search is on
206: */
207: public boolean getWholeWordSearch();
208:
209: /**
210: * Whether or not the whole word search is on
211: */
212: public void setWholeWordSearch(boolean value);
213:
214: /**
215: * Whether or not to open diagrams when navigating
216: */
217: public boolean getDiagramNavigate();
218:
219: /**
220: * Whether or not to open diagrams when navigating
221: */
222: public void setDiagramNavigate(boolean value);
223:
224: }
|