Changeset 2274

Show
Ignore:
Timestamp:
06/03/07 07:19:06 (2 years ago)
Author:
merlimat
Message:

EclipseTracPlugin:

Solved #1569, #1591 and #1389.
Released version 1.0.4

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eclipsetracplugin/eclipse/trunk/EclipseTrac/feature.xml

    r2161 r2274  
    33      id="EclipseTrac" 
    44      label="Eclipse Trac" 
    5       version="1.0.3
     5      version="1.0.4
    66      provider-name="Matteo Merli" 
    77      plugin="mm.eclipse.trac"> 
     
    1212 
    1313   <copyright> 
    14       [Enter Copyright Description here.] 
     14      Copyright (c) 2007 - Matteo Merli &lt;matteo.merli@gmail.com&gt; 
    1515   </copyright> 
    1616 
    17    <license url="http://www.example.com/license"> 
    18       [Enter License Description here.] 
     17   <license> 
     18      Apache License 
     19Version 2.0, January 2004 
     20TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
     211. Definitions. 
     22&quot;License&quot; shall mean the terms and conditions for use, reproduction, 
     23and distribution as defined by Sections 1 through 9 of this document. 
     24&quot;Licensor&quot; shall mean the copyright owner or entity authorized 
     25by 
     26the copyright owner that is granting the License. 
     27&quot;Legal Entity&quot; shall mean the union of the acting entity and 
     28all 
     29other entities that control, are controlled by, or are under 
     30common 
     31control with that entity. For the purposes of this definition, 
     32&quot;control&quot; means (i) the power, direct or indirect, to cause the 
     33direction or management of such entity, whether by contract or 
     34otherwise, or (ii) ownership of fifty percent (50%) or more of 
     35the 
     36outstanding shares, or (iii) beneficial ownership of such entity. 
     37&quot;You&quot; (or &quot;Your&quot;) shall mean an individual or Legal Entity 
     38exercising permissions granted by this License. 
     39&quot;Source&quot; form shall mean the preferred form for making modifications, 
     40including but not limited to software source code, documentation 
     41source, and configuration files. 
     42&quot;Object&quot; form shall mean any form resulting from mechanical 
     43transformation or translation of a Source form, including but 
     44not limited to compiled object code, generated documentation, 
     45and conversions to other media types. 
     46&quot;Work&quot; shall mean the work of authorship, whether in Source or 
     47Object form, made available under the License, as indicated by 
     48
     49copyright notice that is included in or attached to the work 
     50(an example is provided in the Appendix below). 
     51&quot;Derivative Works&quot; shall mean any work, whether in Source or 
     52Object 
     53form, that is based on (or derived from) the Work and for which 
     54the 
     55editorial revisions, annotations, elaborations, or other modifications 
     56represent, as a whole, an original work of authorship. For the 
     57purposes 
     58of this License, Derivative Works shall not include works that 
     59remain 
     60separable from, or merely link (or bind by name) to the interfaces 
     61of, 
     62the Work and Derivative Works thereof. 
     63&quot;Contribution&quot; shall mean any work of authorship, including 
     64the original version of the Work and any modifications or additions 
     65to that Work or Derivative Works thereof, that is intentionally 
     66submitted to Licensor for inclusion in the Work by the copyright 
     67owner 
     68or by an individual or Legal Entity authorized to submit on behalf 
     69of 
     70the copyright owner. For the purposes of this definition, &quot;submitted&quot; 
     71means any form of electronic, verbal, or written communication 
     72sent 
     73to the Licensor or its representatives, including but not limited 
     74to 
     75communication on electronic mailing lists, source code control 
     76systems, 
     77and issue tracking systems that are managed by, or on behalf 
     78of, the 
     79Licensor for the purpose of discussing and improving the Work, 
     80but 
     81excluding communication that is conspicuously marked or otherwise 
     82designated in writing by the copyright owner as &quot;Not a Contribution.&quot; 
     83&quot;Contributor&quot; shall mean Licensor and any individual or Legal 
     84Entity 
     85on behalf of whom a Contribution has been received by Licensor 
     86and 
     87subsequently incorporated within the Work. 
     882. Grant of Copyright License. Subject to the terms and conditions 
     89of 
     90this License, each Contributor hereby grants to You a perpetual, 
     91worldwide, non-exclusive, no-charge, royalty-free, irrevocable 
     92copyright license to reproduce, prepare Derivative Works of, 
     93publicly display, publicly perform, sublicense, and distribute 
     94the 
     95Work and such Derivative Works in Source or Object form. 
     963. Grant of Patent License. Subject to the terms and conditions 
     97of 
     98this License, each Contributor hereby grants to You a perpetual, 
     99worldwide, non-exclusive, no-charge, royalty-free, irrevocable 
     100(except as stated in this section) patent license to make, have 
     101made, 
     102use, offer to sell, sell, import, and otherwise transfer the 
     103Work, 
     104where such license applies only to those patent claims licensable 
     105by such Contributor that are necessarily infringed by their 
     106Contribution(s) alone or by combination of their Contribution(s) 
     107with the Work to which such Contribution(s) was submitted. If 
     108You 
     109institute patent litigation against any entity (including a 
     110cross-claim or counterclaim in a lawsuit) alleging that the Work 
     111or a Contribution incorporated within the Work constitutes direct 
     112or contributory patent infringement, then any patent licenses 
     113granted to You under this License for that Work shall terminate 
     114as of the date such litigation is filed. 
     1154. Redistribution. You may reproduce and distribute copies of 
     116the 
     117Work or Derivative Works thereof in any medium, with or without 
     118modifications, and in Source or Object form, provided that You 
     119meet the following conditions: 
     120(a) You must give any other recipients of the Work or 
     121Derivative Works a copy of this License; and 
     122(b) You must cause any modified files to carry prominent notices 
     123stating that You changed the files; and 
     124(c) You must retain, in the Source form of any Derivative Works 
     125that You distribute, all copyright, patent, trademark, and 
     126attribution notices from the Source form of the Work, 
     127excluding those notices that do not pertain to any part of 
     128the Derivative Works; and 
     129(d) If the Work includes a &quot;NOTICE&quot; text file as part of its 
     130distribution, then any Derivative Works that You distribute must 
     131include a readable copy of the attribution notices contained 
     132within such NOTICE file, excluding those notices that do not 
     133pertain to any part of the Derivative Works, in at least one 
     134of the following places: within a NOTICE text file distributed 
     135as part of the Derivative Works; within the Source form or 
     136documentation, if provided along with the Derivative Works; or, 
     137within a display generated by the Derivative Works, if and 
     138wherever such third-party notices normally appear. The contents 
     139of the NOTICE file are for informational purposes only and 
     140do not modify the License. You may add Your own attribution 
     141notices within Derivative Works that You distribute, alongside 
     142or as an addendum to the NOTICE text from the Work, provided 
     143that such additional attribution notices cannot be construed 
     144as modifying the License. 
     145You may add Your own copyright statement to Your modifications 
     146and 
     147may provide additional or different license terms and conditions 
     148for use, reproduction, or distribution of Your modifications, 
     149or 
     150for any such Derivative Works as a whole, provided Your use, 
     151reproduction, and distribution of the Work otherwise complies 
     152with 
     153the conditions stated in this License. 
     1545. Submission of Contributions. Unless You explicitly state otherwise, 
     155any Contribution intentionally submitted for inclusion in the 
     156Work 
     157by You to the Licensor shall be under the terms and conditions 
     158of 
     159this License, without any additional terms or conditions. 
     160Notwithstanding the above, nothing herein shall supersede or 
     161modify 
     162the terms of any separate license agreement you may have executed 
     163with Licensor regarding such Contributions. 
     1646. Trademarks. This License does not grant permission to use 
     165the trade 
     166names, trademarks, service marks, or product names of the Licensor, 
     167except as required for reasonable and customary use in describing 
     168the 
     169origin of the Work and reproducing the content of the NOTICE 
     170file. 
     1717. Disclaimer of Warranty. Unless required by applicable law 
     172or 
     173agreed to in writing, Licensor provides the Work (and each 
     174Contributor provides its Contributions) on an &quot;AS IS&quot; BASIS, 
     175WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
     176or 
     177implied, including, without limitation, any warranties or conditions 
     178of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 
     179PARTICULAR PURPOSE. You are solely responsible for determining 
     180the 
     181appropriateness of using or redistributing the Work and assume 
     182any 
     183risks associated with Your exercise of permissions under this 
     184License. 
     1858. Limitation of Liability. In no event and under no legal theory, 
     186whether in tort (including negligence), contract, or otherwise, 
     187unless required by applicable law (such as deliberate and grossly 
     188negligent acts) or agreed to in writing, shall any Contributor 
     189be 
     190liable to You for damages, including any direct, indirect, special, 
     191incidental, or consequential damages of any character arising 
     192as a 
     193result of this License or out of the use or inability to use 
     194the 
     195Work (including but not limited to damages for loss of goodwill, 
     196work stoppage, computer failure or malfunction, or any and all 
     197other commercial damages or losses), even if such Contributor 
     198has been advised of the possibility of such damages. 
     1999. Accepting Warranty or Additional Liability. While redistributing 
     200the Work or Derivative Works thereof, You may choose to offer, 
     201and charge a fee for, acceptance of support, warranty, indemnity, 
     202or other liability obligations and/or rights consistent with 
     203this 
     204License. However, in accepting such obligations, You may act 
     205only 
     206on Your own behalf and on Your sole responsibility, not on behalf 
     207of any other Contributor, and only if You agree to indemnify, 
     208defend, and hold each Contributor harmless for any liability 
     209incurred by, or claims asserted against, such Contributor by 
     210reason 
     211of your accepting any such warranty or additional liability. 
     212END OF TERMS AND CONDITIONS 
     213APPENDIX: How to apply the Apache License to your work. 
     214To apply the Apache License to your work, attach the following 
     215boilerplate notice, with the fields enclosed by brackets &quot;[]&quot; 
     216replaced with your own identifying information. (Don&apos;t include 
     217the brackets!)  The text should be enclosed in the appropriate 
     218comment syntax for the file format. We also recommend that a 
     219file or class name and description of purpose be included on 
     220the 
     221same &quot;printed page&quot; as the copyright notice for easier 
     222identification within third-party archives. 
     223Copyright 2007 Matteo Merli 
     224Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); 
     225you may not use this file except in compliance with the License. 
     226You may obtain a copy of the License at 
     227http://www.apache.org/licenses/LICENSE-2.0 
     228Unless required by applicable law or agreed to in writing, software 
     229distributed under the License is distributed on an &quot;AS IS&quot; BASIS, 
     230WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
     231or implied. 
     232See the License for the specific language governing permissions 
     233and 
     234limitations under the License. 
    19235   </license> 
    20236 
  • eclipsetracplugin/eclipse/trunk/mm.eclipse.trac/META-INF/MANIFEST.MF

    r2161 r2274  
    33Bundle-Name: Trac Plug-in 
    44Bundle-SymbolicName: mm.eclipse.trac; singleton:=true 
    5 Bundle-Version: 1.0.3 
     5Bundle-Version: 1.0.4 
    66Bundle-Activator: mm.eclipse.trac.Activator 
    77Require-Bundle: org.eclipse.ui, 
  • eclipsetracplugin/eclipse/trunk/mm.eclipse.trac/src/mm/eclipse/trac/server/NewTracServerPage.java

    r2108 r2274  
    1414import org.eclipse.swt.events.SelectionEvent; 
    1515import org.eclipse.swt.events.SelectionListener; 
     16import org.eclipse.swt.graphics.Color; 
    1617import org.eclipse.swt.layout.GridData; 
    1718import org.eclipse.swt.layout.GridLayout; 
     
    3435     
    3536    private Button     anonymous; 
     37    private Button     validateButton; 
    3638     
    3739    private Text       username; 
     
    4648        setTitle( "Add a connection with Trac server" ); 
    4749        setDescription( "This wizard creates a new connections with a Trac server." ); 
     50        setPageComplete( false ); 
    4851    } 
    4952     
     
    109112        password.setEchoChar( (char) 0x2022 ); 
    110113        password.addModifyListener( this ); 
     114         
     115        validateButton = new Button( container, SWT.PUSH ); 
     116        validateButton.setText( "Validate server connection" ); 
     117        validateButton.addSelectionListener( new SelectionListener() { 
     118 
     119            public void widgetDefaultSelected( SelectionEvent e ) 
     120            { 
     121            } 
     122 
     123            public void widgetSelected( SelectionEvent e ) 
     124            { 
     125                validateConnection(); 
     126                if ( isPageComplete() ) 
     127                { 
     128                    validateButton.setText( "Connection with server is OK." ); 
     129                    validateButton.setEnabled( false ); 
     130                } 
     131                else 
     132                { 
     133                    validateButton.setText( "Cannot connect to server." ); 
     134                } 
     135            } 
     136             
     137        } ); 
    111138         
    112139        setControl( container ); 
     
    120147    public void modifyText( ModifyEvent e ) 
    121148    { 
     149        validateButton.setEnabled( true ); 
     150        validateButton.setText( "Validate server connection" ); 
     151         
    122152        if ( getServerName().length() == 0 ) 
    123153        { 
     
    137167            url = new URL( getServerUrl() ); 
    138168             
    139             if ( ! "http".equals( url.getProtocol() ) && ! "https".equals( url.getProtocol() ) ) 
    140             { 
    141                 updateStatus( "Invalid protocol scheme '" + url.getProtocol() + "'. Must be 'http' or 'https' " ); 
     169            if ( !"http".equals( url.getProtocol() ) 
     170                    && !"https".equals( url.getProtocol() ) ) 
     171            { 
     172                updateStatus( "Invalid protocol scheme '" + url.getProtocol() 
     173                        + "'. Must be 'http' or 'https' " ); 
    142174                return; 
    143175            } 
     
    155187        } 
    156188         
     189        setErrorMessage( null ); 
     190    } 
     191     
     192    private void validateConnection() 
     193    { 
    157194        // Validate connection 
    158          
    159         server = new TracServer( getServerName(), url, getUsername(), 
    160                                             getPassword(), getAnonymous() ); 
    161         server.connect(); 
    162         if ( !server.isConnected() ) 
    163         { 
    164             updateStatus( "Connection with server failed." ); 
     195        URL url; 
     196        try 
     197        { 
     198            url = new URL( getServerUrl() ); 
     199             
     200            server = new TracServer( getServerName(), url, getUsername(), getPassword(), 
     201                                     getAnonymous() ); 
     202            server.connect(); 
     203            if ( !server.isConnected() ) 
     204            { 
     205                updateStatus( "Connection with server failed." ); 
     206                return; 
     207            } 
     208             
     209        } catch ( MalformedURLException e ) 
     210        { 
     211            updateStatus( "The URL is not valid." ); 
    165212            return; 
    166213        } 
  • eclipsetracplugin/eclipse/trunk/mm.eclipse.trac/src/mm/eclipse/trac/views/actions/TracServerActionProvider.java

    r2161 r2274  
    123123            createPageAction.setEnabled( server.isConnected() ); 
    124124             
    125             menu.add( createPageAction ); 
    126             menu.add( new Separator() ); 
     125            // TODO: Enable create page action 
     126            // menu.add( createPageAction ); 
     127            // menu.add( new Separator() ); 
    127128            menu.add( connectAction ); 
    128129            menu.add( disconnectAction ); 
  • eclipsetracplugin/eclipse/trunk/mm.eclipse.trac/src/mm/eclipse/trac/views/actions/WikiPageActionsProvider.java

    r2161 r2274  
    55import org.eclipse.jface.action.Action; 
    66import org.eclipse.jface.action.IMenuManager; 
    7 import org.eclipse.jface.action.Separator; 
    87import org.eclipse.jface.viewers.IStructuredSelection; 
    98import org.eclipse.jface.viewers.StructuredViewer; 
     
    1817    private Action           actionOpenEditor; 
    1918     
    20     private Action                 actionCreatePage; 
     19    // private Action              actionCreatePage; 
    2120     
    2221    public WikiPageActionsProvider( StructuredViewer viewer ) 
     
    3130        actionOpenEditor = new OpenEditor( viewer ); 
    3231        actionCommitPage = new CommitPage( viewer ); 
    33         actionCreatePage = new CreatePage( viewer ); 
     32        // TODO: Enable create page action 
     33        // actionCreatePage = new CreatePage( viewer ); 
    3434    } 
    3535     
     
    4545            actionOpenEditor.setEnabled( page.exists() && !page.isRoot() ); 
    4646            actionCommitPage.setEnabled( page.exists() && page.isDirty() ); 
    47             actionCreatePage.setEnabled( true ); 
     47            // actionCreatePage.setEnabled( true ); 
    4848             
    4949            menu.add( actionOpenEditor ); 
  • eclipsetracplugin/eclipse/trunk/mm.eclipse.trac/src/mm/eclipse/trac/xmlrpc/Trac.java

    r2093 r2274  
    1616import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; 
    1717import org.apache.xmlrpc.client.XmlRpcLiteHttpTransportFactory; 
     18import org.apache.xmlrpc.client.XmlRpcSunHttpTransport; 
     19import org.apache.xmlrpc.client.XmlRpcSunHttpTransportFactory; 
    1820 
    1921public class Trac 
     
    5456        XmlRpcClient client = new XmlRpcClient(); 
    5557        client.setConfig( config ); 
    56         client.setTransportFactory( new XmlRpcLiteHttpTransportFactory( client ) ); 
     58        client.setTransportFactory( new XmlRpcSunHttpTransportFactory( client ) ); 
    5759         
    5860        proxy = new DynamicProxy( client ); 
  • eclipsetracplugin/eclipse/update/site.xml

    r2161 r2274  
    44      Trac Plugin 
    55   </description> 
    6    <feature url="features/EclipseTrac_1.0.3.jar" id="EclipseTrac" version="1.0.3"> 
     6   <feature url="features/EclipseTrac_1.0.4.jar" id="EclipseTrac" version="1.0.4"> 
    77      <category name="Trac"/> 
    88   </feature>