Changeset 1548
- Timestamp:
- 01/26/21 09:45:54 (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.classpath
r1273 r1548 4 4 <classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/> 5 5 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 6 <classpathentry kind="lib" path="releases/jars/activation.jar"/>7 <classpathentry kind="lib" path="releases/jars/cobra.jar"/>8 6 <classpathentry kind="lib" path="releases/jars/iText-2.1.3.jar"/> 9 7 <classpathentry kind="lib" path="releases/jars/jcommon-1.0.13.jar"/> … … 11 9 <classpathentry kind="lib" path="releases/jars/JFreeCharts.jar"/> 12 10 <classpathentry kind="lib" path="releases/jars/js.jar"/> 13 <classpathentry kind="lib" path="releases/jars/jython-standalone-2.7.0.jar"/>14 11 <classpathentry kind="lib" path="releases/jars/lobo.jar"/> 15 <classpathentry kind="lib" path="releases/jars/lobo-pub.jar"/>16 12 <classpathentry kind="lib" path="releases/jars/xercesImpl.jar"/> 17 13 <classpathentry kind="lib" path="releases/jars/jazzy-core.jar"/> … … 22 18 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> 23 19 <classpathentry kind="lib" path="releases/jars/svgSalamander.jar"/> 24 <classpathentry kind="lib" path="releases/jars/jl1.0.1.jar"/>25 <classpathentry kind="lib" path="releases/jars/tritonus_share.jar"/>26 <classpathentry kind="lib" path="releases/jars/mp3spi1.9.5.jar"/>27 <classpathentry kind="lib" path="releases/jars/TarsosDSP-2.3.jar"/>28 20 <classpathentry kind="lib" path="releases/jars/javax.mail.jar"/> 29 <classpathentry kind="lib" path="releases/jars/sqlite-jdbc-3.23.1.jar"/>30 21 <classpathentry kind="lib" path="releases/jars/Shamir.jar"/> 31 22 <classpathentry kind="output" path="bin/src"/> -
trunk/META-INF/MANIFEST.MF
r1244 r1548 5 5 Bundle-Version: 1.0.0.qualifier 6 6 Bundle-ClassPath: Expeditee.jar, 7 releases/jars/activation.jar,8 releases/jars/cobra.jar,9 7 releases/jars/iText-2.1.3.jar, 10 8 releases/jars/jcommon-1.0.13.jar, … … 13 11 releases/jars/js.jar, 14 12 releases/jars/lobo.jar, 15 releases/jars/lobo-pub.jar,16 13 releases/jars/mail.jar, 17 14 releases/jars/xercesImpl.jar, … … 69 66 com.mxgraph.util.svg, 70 67 com.mxgraph.view, 71 com.steadystate.css,72 com.steadystate.css.dom,73 com.steadystate.css.parser,74 com.steadystate.css.parser.selectors,75 com.sun.activation.registries,76 com.sun.activation.viewers,77 68 com.sun.mail.handlers, 78 69 com.sun.mail.iap, … … 98 89 com.swabunga.util, 99 90 images, 100 javax.activation,101 91 javax.mail, 102 92 javax.mail.event, … … 236 226 org.lobobrowser.context, 237 227 org.lobobrowser.gui, 238 org.lobobrowser.html,239 org.lobobrowser.html.domimpl,240 org.lobobrowser.html.gui,241 org.lobobrowser.html.io,242 org.lobobrowser.html.js,243 org.lobobrowser.html.parser,244 org.lobobrowser.html.renderer,245 org.lobobrowser.html.style,246 org.lobobrowser.html.test,247 228 org.lobobrowser.io, 248 org.lobobrowser.js,249 229 org.lobobrowser.main, 250 230 org.lobobrowser.protocol.res, … … 305 285 org.nfunk.jepexamples, 306 286 org.nfunk.jeptesting, 307 org.w3c.css.sac,308 org.w3c.css.sac.helpers,309 org.w3c.dom.css,310 287 org.w3c.dom.html, 311 org.w3c.dom.html2,312 org.w3c.dom.stylesheets,313 org.w3c.dom.views,314 288 org.xamjwg.platform, 315 289 properties, -
trunk/src/org/expeditee/gio/gesture/StandardGestureActions.java
r1532 r1548 4716 4716 * attributes, so it is not checked. 4717 4717 * 4718 * 25/01/2021: If the user has Items attached to the cursor, they are used to 4719 * specify what attributes to extract. For example, if the user has "Width:" 4720 * attached to their cursor, only the width attribute will be extracted rather 4721 * than all of them. 4722 * 4718 4723 * @param toExtract 4719 4724 * Item containing the Item to extract the attributes from. … … 4723 4728 return; 4724 4729 } 4725 4726 if (FreeItems.hasItemsAttachedToCursor()) { 4727 return; 4728 } 4729 4730 4730 4731 Item attribs; 4731 4732 Item item = toExtract; 4733 Object toExtractFrom = item.isFrameName() ? item.getParent() : item; 4734 4732 4735 // Extract the frames attributes when the user clicks on the frame name 4733 4736 FrameGraphics.changeHighlightMode(item, HighlightMode.None); 4734 4737 if (item.isFrameName()) { 4735 attribs = AttributeUtils.extractAttributes( item.getParent());4738 attribs = AttributeUtils.extractAttributes(toExtractFrom); 4736 4739 } else { 4737 attribs = AttributeUtils.extractAttributes(item); 4740 attribs = AttributeUtils.extractAttributes(toExtractFrom); 4741 } 4742 4743 if (FreeItems.hasItemsAttachedToCursor()) { 4744 return; 4738 4745 } 4739 4746 -
trunk/src/org/expeditee/gui/AttributeUtils.java
r1513 r1548 22 22 import java.lang.reflect.InvocationTargetException; 23 23 import java.lang.reflect.Method; 24 import java.util.Collection; 24 25 import java.util.HashMap; 25 26 import java.util.LinkedList; … … 427 428 throw new IncorrectTypeException("toExtract", "Item | Frame"); 428 429 } 429 430 431 // If there are Items attached to cursor, extract only those properties being asked for 432 if (FreeItems.hasItemsAttachedToCursor()) { 433 extractSpecifiedAttributes(toExtract, attribSet); 434 return null; 435 } 436 430 437 // StringBuffer to store all the extracted Attribute:Value pairs 431 438 StringBuffer attributes = new StringBuffer(); … … 468 475 } 469 476 477 /** 478 * Extracts only the attributes specified by the FreeItems. 479 * Designed to be called exclusively from AttributeUtils::extractAttributes 480 * @param toExtract The Item or Frame to extract attributes from 481 * @param attributes The set of attributes to consult 482 */ 483 private static void extractSpecifiedAttributes(Object toExtract, AttributeSet attributes) { 484 Collection<Text> textItemsOnCursor = FreeItems.getTextItems(); 485 List<String> keys = attributes.keys; 486 487 for (Text canditate: textItemsOnCursor) { 488 String canditateContent = canditate.getText().trim(); 489 if (canditateContent.charAt(canditateContent.length() - 1) == ':') { 490 String attributeName = canditateContent.substring(0, canditateContent.length() - 1); 491 String attributeNameLower = attributeName.toLowerCase(); 492 if (keys.contains(attributeNameLower)) { 493 Attribute a = attributes.get(attributeNameLower); 494 // Make sure the classes of the methods match the item 495 if (a != null && a.getter != null && a.getter.getDeclaringClass().isAssignableFrom(toExtract.getClass())) { 496 String value = getValue(attributeNameLower, a, toExtract, true); 497 if (value == null) { 498 continue; 499 } 500 canditate.setText(attributeName + ": " + value); 501 } 502 } 503 } 504 } 505 } 506 470 507 /** 471 508 * Gets a string form of the value for a given item get method.
Note:
See TracChangeset
for help on using the changeset viewer.