Changeset 23244 in osm for applications/editors/josm/plugins/smed_ex
- Timestamp:
- 2010-09-17T23:14:51+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/smed_ex
- Files:
-
- 1 deleted
- 2 edited
-
build.xml (modified) (11 diffs)
-
src/smed_ex/SmedEx.java (modified) (1 diff)
-
src/smed_ex/build.xml (deleted)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed_ex/build.xml
r23231 r23244 28 28 ** 29 29 --> 30 <project name=" 01_smed_ex" basedir=".">30 <project name="smed_ex" basedir="."> 31 31 32 32 <!-- enter the SVN commit message --> … … 35 35 <property name="plugin.main.version" value="3329" /> 36 36 37 <!-- Declaring time-stamps--> 38 <tstamp/> 37 39 38 40 <!-- … … 41 43 --> 42 44 <property name="josm" location="../../core/dist/josm-custom.jar"/> 43 <property name="smed" location="../../dist/smed.jar /"/>45 <property name="smed" location="../../dist/smed.jar"/> 44 46 <property name="plugin.build.dir" value="build"/> 47 <property name="plugin.src.dir" value="src"/> 45 48 <property name="smed.build.dir" value="../smed/build"/> 46 49 <property name="smed.src.dir" value="../smed/src"/> 47 50 <property name="smed.plugins" value="../smed/plugins"/> 48 <property name="plugin.src.dir" value="src"/>49 51 <!-- this is the directory where the plugin jar is copied to --> 50 <property name="plugin.dist.dir" value="../../dist"/>51 52 <property name="ant.build.javac.target" value="1.5"/> 52 <property name="plugin.dist.dir" value="../../dist"/> 53 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 54 <property name="smed.jar" value="${plugin.dist.dir}/smed.jar"/> 55 53 <property name="plugin.dist.dir" value="smed_dist"/> 54 <property name="plugin.jar" value="${plugin.dist.dir}/01_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/> 56 55 57 56 <!-- … … 62 61 <target name="init"> 63 62 <mkdir dir="${plugin.build.dir}"/> 64 </target>65 63 <mkdir dir="${plugin.dist.dir}"/> 64 </target> 66 65 <!-- 67 66 ********************************************************** … … 79 78 --> 80 79 <target name="compile_smed" depends="init_smed"> 81 <echo message="compiling sources for ${smed.jar}... "/>80 <echo message="compiling sources for smed.jar ... "/> 82 81 <javac srcdir="${smed.src.dir}" classpath="${josm}" debug="true" destdir="${smed.build.dir}"> 83 82 <compilerarg value="-Xlint:deprecation"/> … … 85 84 </javac> 86 85 </target> 87 88 <!-- 89 ********************************************************** 90 ** compile - comp iles the source tree86 87 <!-- 88 ********************************************************** 89 ** compile - complies the source tree 91 90 ********************************************************** 92 91 --> … … 126 125 </copy> 127 126 128 <jar destfile="${smed .jar}" basedir="${smed.build.dir}">127 <jar destfile="${smed}" basedir="${smed.build.dir}"> 129 128 <!-- 130 129 ************************************************ … … 172 171 </fileset> 173 172 </copy> 173 174 <delete> 175 <fileset dir="${plugin.dist.dir}"> 176 <include name="*smed_ex.jar"/> 177 </fileset> 178 </delete> 179 174 180 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 175 181 <!-- … … 194 200 </jar> 195 201 196 <copy file="${plugin.jar}" todir="${smed.plugins}"/>197 198 202 </target> 199 203 … … 204 208 --> 205 209 <target name="clean"> 206 <delete dir="${plugin.build.dir}"/>207 <delete file="${plugin.jar}"/>208 210 <delete dir="${smed.build.dir}"/> 209 <delete file="${smed.jar}"/> 211 <delete file="${smed}"/> 212 <delete> 213 <fileset dir="${plugin.dist.dir}"> 214 <include name="*smed_ex.jar"/> 215 </fileset> 216 </delete> 217 210 218 </target> 211 219 … … 217 225 <target name="install" depends="dist"> 218 226 <property environment="env"/> 219 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug" else="${user.home}/.josm/plugins/splug"> 227 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug/" else="${user.home}/.josm/plugins/splug/"> 220 228 <and> 221 229 <os family="windows"/> 222 230 </and> 223 231 </condition> 232 233 <delete> 234 <fileset dir="${josm.plugins.dir}"> 235 <include name="*smed_ex.jar"/> 236 </fileset> 237 </delete> 238 224 239 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 225 240 </target> -
applications/editors/josm/plugins/smed_ex/src/smed_ex/SmedEx.java
r23209 r23244 16 16 public class SmedEx implements SmedPluggable { 17 17 18 private JPanel jPanel = null; // @jve:decl-index=0:visual-constraint="78,30"19 private JButton jButton = null;18 private JPanel jPanel = null; // @jve:decl-index=0:visual-constraint="78,30" 19 private JButton jButton = null; 20 20 21 @Override22 public boolean stop() {23 // TODO Auto-generated method stub24 return false;25 }21 @Override 22 public boolean stop() { 23 // TODO Auto-generated method stub 24 return false; 25 } 26 26 27 @Override28 public String getName() {27 @Override 28 public String getName() { 29 29 30 return "hello";31 }30 return "Hello"; 31 } 32 32 33 @Override34 public String getInfo() {33 @Override 34 public String getInfo() { 35 35 36 return "say hello";37 }36 return "say hello"; 37 } 38 38 39 @Override 40 public JComponent getComponent() { 39 @Override 40 public JComponent getComponent() { 41 42 return getJPanel(); 43 } 41 44 42 return getJPanel(); 43 } 45 @Override 46 public void setPluginManager(SmedPluginManager manager) { 47 // TODO Auto-generated method stub 44 48 45 @Override 46 public void setPluginManager(SmedPluginManager manager) { 47 // TODO Auto-generated method stub 49 } 48 50 49 } 51 /** 52 * This method initializes jPanel 53 * 54 * @return javax.swing.JPanel 55 */ 56 private JPanel getJPanel() { 57 if (jPanel == null) { 58 jPanel = new JPanel(); 59 jPanel.setLayout(null); 60 jPanel.setPreferredSize(new Dimension(200, 130)); 61 jPanel.add(getJButton(), null); 62 } 63 return jPanel; 64 } 50 65 51 /** 52 * This method initializes jPanel 53 * 54 * @return javax.swing.JPanel 55 */ 56 private JPanel getJPanel() { 57 if (jPanel == null) { 58 jPanel = new JPanel(); 59 jPanel.setLayout(null); 60 jPanel.setPreferredSize(new Dimension(200, 130)); 61 jPanel.add(getJButton(), null); 62 } 63 return jPanel; 64 } 66 /** 67 * This method initializes jButton 68 * 69 * @return javax.swing.JButton 70 */ 71 private JButton getJButton() { 72 if (jButton == null) { 73 jButton = new JButton(); 74 jButton.setBounds(new Rectangle(15, 40, 160, 40)); 75 jButton.setText("Hello World!"); 76 77 jButton.addActionListener(new ActionListener() { 65 78 66 /** 67 * This method initializes jButton 68 * 69 * @return javax.swing.JButton 70 */ 71 private JButton getJButton() { 72 if (jButton == null) { 73 jButton = new JButton(); 74 jButton.setBounds(new Rectangle(15, 40, 160, 40)); 75 jButton.setText("Hello World!"); 79 @Override 80 public void actionPerformed(ActionEvent e) { 81 JOptionPane.showMessageDialog( null, "it works" ); 82 } 83 84 }); 85 } 86 return jButton; 87 } 76 88 77 jButton.addActionListener(new ActionListener() { 78 79 @Override 80 public void actionPerformed(ActionEvent e) { 81 JOptionPane.showMessageDialog( null, "it works" ); 82 } 83 84 }); 85 } 86 return jButton; 87 } 88 89 @Override 90 public boolean start() { 91 // TODO Auto-generated method stub 92 return false; 93 } 89 @Override 90 public boolean start() { 91 // TODO Auto-generated method stub 92 return false; 93 } 94 94 95 95 }
Note:
See TracChangeset
for help on using the changeset viewer.
