<< Click to Display Table of Contents >> Navigation: User Interface > Project Search |
The program has a very powerful project-wide search feature.
The search can be accessed:
Manually:
1.by pressing CTRL-F
2.by clicking into the menu Window - Project-Search...
3.by clicking into the menu Edit - Project-Search
4.by using Variable View/Project-Tree - Variable Context-Menu - Find Usage of Variable
5.by using Project-Tree - JS-Node - Context-Menu - Find Usage of JavaScript
Automatically:
1.During load of Project - if the loaded project has warnings
2.If a variable should be deleted and the variable is used in JS- files or in other DDO-objects/CAN mappings. The search will show its usages.
3.If a JS file should be deleted and the script is used in other JS files or in DDO-objects/CAN mappings. The search will show its usages.
The default position of the project search component is a tab next to the project tree tab.
1.Combo-Box: list of all opened projects
2.Text box/Combo box: search command
3.Button: search
4.Check boxes: search settings
5.Label: search details
6.Tree: search results
7.Latching button: show all search settings
8.Latching button: show detailed search results. (property/event matches)
9.Button: go to previous search result node (with rollover)
10.Button: go to next search result node (with Rollover)
11.Latching button: show search results as a tree (similar to project tree)
12.Latching button: show search results as a list
13.Latching button: expand search tree
14.Latching button: collapse search tree
1.Combo-Box: list of all opened projects
•List is empty if no project is available
•List is always enabled
•The selected project is used for the search
2.Text box/Combo box: search command
•Combo-Box is always enabled
•Combo-Box contains the last 10 search commands
•The last 10 search commands will be saved and restored after start of Projektor.
•If the search command is invalid the border will be painted in red and an info message will be shown below the combo-box with detailed information.
•If a searched was performed and the appropriate project is closed and no other opened project exists, a message will be shown that the project was closed and the search-tree(6) will be cleared.
•If more than 5000 search hits are found the an error is shown. This is currently necessary because otherwise expanding the tree takes too much time.
3.Button: search
•Button is only enabled if at least one opened project exists and the search command is not empty
•The Button starts the search and the results are shown in the search tree(6)
•The search can also be started if the Enter key is pressed while the search command text field has focus.
4.Check boxes: search settings
•Regexp: Use Regular-Expressions for search command
Default-State=Deselected
•Match Case: Lower/Upper case must match
Default-State=Deselected
•Whole Word: The search expression must be a separated word.
Default-State=Deselected
•Match Property/Event Name: The named Property/Event must match exactly => example is shown later
Default-State=Selected
5.Label: search details
•Found objects and found matches, search time and count of all searched objects => Only if at least one match was found
•No Matching objects found! search time and count of all search objects => if no match was found
6.Tree: search results
•Shows the Project-Node of the current selected project and the search results
•If no match was found only the Project-Node is visible.
•If no opened project exists the following message is shown: No current search!
7.Latching button: show all search settings
•Shows/hides the detailed search settings panel
•Default states:
All check boxes are selected except of the first
If a check box will be deselected, the according project part won't be considered for the search.
Pages does also include MiniView-Pages.
The Project itself with its properties/events will be always considered for the search.
•If the first check box is selected (Search only in opened components) the other check boxes will be deselected and disabled
•If the first check box is deselected the other check boxes will be selected and enabled again.
•If no check-box is selected a warning is shown
8.Latching button: show detailed search results. (property/event matches)
•Shows/Hides the detailed search results (Default is Enabled/Selected)
•Enabled
•Disabled
9.Button: go to previous search result node (with rollover)
•Selects the previous search result object and opens the appropriate page/alarm/VKB and selects the object in the scene.
•For communication objects nothing special happens
•For JS files the file will be opened.
•If currently the first object is selected an the button is pressed, it jumps to the last object in the list (roll over)
10.Button: go to next search result node (with Rollover)
•same as for previous button, only the other direction
11.Latching button: show search results as a tree (similar to project tree)
•Switches between List/Tree View (Default is List-View)
•Tree view:
12.Latching button: show search results as a list
•Switches between List/Tree View (Default is List-View)
•List view:
13.Latching button: expand search tree
•Expands search tree (Default state: selected)
Should only be used if tree view is enabled (makes no sense otherwise)
14.Latching button: collapse search tree
•Collapse Search-Tree (Default State: Deselected)
Should only be used if Tree-View is enabled (makes no sense otherwise)
The tree will be collapsed, till the Pages
The Search-Command-Text-Box can be used in many different ways.
For the current examples the Welcome-Project with default search settings are used.
Possible syntaxes:
•Simple String (see Example 1)
•Property Search (see Example 2)
•Number (see Example 3)
•Combination of String and Property (see Example 4)
General syntax rules:
Property - Operator - Value
#[Property-Name]=Value
Additionally several search expressions can be connected with && or ||
#[Property-Name]=Value && #[Property-Name]<=Value
Additionally brackets () can be used:
(#[Property-Name]=Value && #[Property-Name]!=Value) || #[Property-Name]>Value
For property searches the following operators are available:
For Strings and Numbers:
•[Equal/Contain] = or ==
•[Not Equal] != or <>
Only for Numbers:
•[Greater] > or >=
•[Lower] < or <=
Example 1 => Simple String:
Search Command:
test
For the 1st example the simple word test is typed into the search command box.
The String test is now search in every property/event of all Objects of all Pages/Alarms and VKBs in the Welcome-Project. Beside it will be searched in all Communication Objects (Variables, CAN-Messages and Owners) and in all JS-Files.
Example 2 => Property Search:
Search Command:
#[Name]=test
The 2nd example shows a search where the simple word test is searched only in Name properties. All other properties will be ignored.
The String test is now searched in every Name property of all Objects in all Pages/Alarms and VKBs in the Welcome-Project. It will also be searched in all Name properties of the Communication Objects (Variables, CAN-Messages and Owners) and in all JS file names.
If the property NAME is searched, the JS file names will also be considered. For all other properties the JS files will be ignored, because they don't have properties.
Example 3 => Simple Integer search:
Search Command:
12
For the 3rd example the number 12 is typed for the search.
The number 12 is now searched in every property/event of all Objects of all Pages/Alarms and VKBs in the Welcome-Project. It will also be searched in all Communication Objects (Variables, CAN-Messages and Owners) and in all JS files.
If the data type of the property is a number (Integer, Float, Double) the value must match exactly.
E.g.
Property: Width = 123 => would not match, but
Property: Height = 12 => would match
If the data Type of the property is a string the value must contain the string value 12
E.g.
Property: Name = 1200 bits
=> would match
Example 4 => Connecting search commands
Search Command:
(#[Type ID]=8 || #[Type ID]=9) && test
In the 4th example it is searched for the word test again, but now the Type ID of the found object(s) must be 8 or 9 (String Field or Numeric Field)
The String test is now searched in all properties of all Objects in all Pages/Alarms and VKBs in the Welcome-Project. It will also be searched in all properties of the Communication Objects (Variables, CAN-Messages and Owners).
Note:
All properties and events can be used for the search.
Exceptions are only:
•Border Profile and
•List-Items
For the Project the following properties are searchable:
•General
•Object
•Alarm
•Variable Logging
•ISO-Bus
•Day-/Night
Currently it is not possible to search for properties of an event, e.g. the Property Periods (100 ms) of the event OnProjectRepeat.
Example 5 => Searching for all input objects on Page X
Open the page(s) you want to search in
Settings:
Search Command: #[Set As Input]=true
Example 6 => Exchange the Font property for all String Fields with DejaVu (bulk property editing)
Here it is searched for all String Fields that don't have language dependency that use the Font DejaVu
Search command: #[Font]=DejaVu Sans && #[Type ID]=8 && #[Dependency]=None
Now the Font property of all found objects can be selected, by right-clicking the Font property of one of the found objects:
Note that either ALL objects that use this font can be selected, or only all results in day theme or night theme, respectively.
With clicking Select all Font property results, all the objects will be selected and in the property window the Font property can be changed for all objects at once: