View | Details | Raw Unified | Return to bug 264520
Collapse All | Expand All

(-)schema/driverExtension.exsd (-24 / +36 lines)
Lines 1-10 Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!-- Schema file written by PDE -->
2
<!-- Schema file written by PDE -->
3
<schema targetNamespace="org.eclipse.datatools.connectivity">
3
<schema targetNamespace="org.eclipse.datatools.connectivity" xmlns="http://www.w3.org/2001/XMLSchema">
4
<annotation>
4
<annotation>
5
      <appInfo>
5
      <appinfo>
6
         <meta.schema plugin="org.eclipse.datatools.connectivity" id="driverExtension" name="Driver Definition"/>
6
         <meta.schema plugin="org.eclipse.datatools.connectivity" id="driverExtension" name="Driver Definition"/>
7
      </appInfo>
7
      </appinfo>
8
      <documentation>
8
      <documentation>
9
         &lt;p&gt;
9
         &lt;p&gt;
10
The driverExtension is used by developers to define templates that describe the mechanical components necessary for opening connections to servers.  Users create specific driver definitions using these templates.
10
The driverExtension is used by developers to define templates that describe the mechanical components necessary for opening connections to servers.  Users create specific driver definitions using these templates.
Lines 19-24 Link Here
19
   </annotation>
19
   </annotation>
20
20
21
   <element name="extension">
21
   <element name="extension">
22
      <annotation>
23
         <appinfo>
24
            <meta.element />
25
         </appinfo>
26
      </annotation>
22
      <complexType>
27
      <complexType>
23
         <sequence>
28
         <sequence>
24
            <element ref="category" minOccurs="0" maxOccurs="unbounded"/>
29
            <element ref="category" minOccurs="0" maxOccurs="unbounded"/>
Lines 152-160 Link Here
152
               <documentation>
157
               <documentation>
153
                  
158
                  
154
               </documentation>
159
               </documentation>
155
               <appInfo>
160
               <appinfo>
156
                  <meta.attribute kind="java" basedOn=":org.eclipse.datatools.connectivity.drivers.IDriverValuesProvider"/>
161
                  <meta.attribute kind="java" basedOn=":org.eclipse.datatools.connectivity.drivers.IDriverValuesProvider"/>
157
               </appInfo>
162
               </appinfo>
158
            </annotation>
163
            </annotation>
159
         </attribute>
164
         </attribute>
160
         <attribute name="defaultDefinitionName" type="string">
165
         <attribute name="defaultDefinitionName" type="string">
Lines 259-267 Link Here
259
 
264
 
260
Also note that there is a new interface that your Property Descriptor can extend called org.eclipse.datatools.connectivity.drivers.IDriverInstancePropertyDescriptor. This interface allows you to pass the Driver Instance to your descriptor when it is instantiated in the Edit Driver Definition dialog.
265
Also note that there is a new interface that your Property Descriptor can extend called org.eclipse.datatools.connectivity.drivers.IDriverInstancePropertyDescriptor. This interface allows you to pass the Driver Instance to your descriptor when it is instantiated in the Edit Driver Definition dialog.
261
               </documentation>
266
               </documentation>
262
               <appInfo>
267
               <appinfo>
263
                  <meta.attribute kind="java" basedOn="org.eclipse.ui.views.properties.PropertyDescriptor" deprecated="true"/>
268
                  <meta.attribute kind="java" basedOn="org.eclipse.ui.views.properties.PropertyDescriptor" deprecated="true"/>
264
               </appInfo>
269
               </appinfo>
265
            </annotation>
270
            </annotation>
266
         </attribute>
271
         </attribute>
267
         <attribute name="category" type="string">
272
         <attribute name="category" type="string">
Lines 338-346 Link Here
338
               <documentation>
343
               <documentation>
339
                  
344
                  
340
               </documentation>
345
               </documentation>
341
               <appInfo>
346
               <appinfo>
342
                  <meta.attribute kind="java" basedOn=":org.eclipse.datatools.connectivity.drivers.IDriverValuesProvider"/>
347
                  <meta.attribute kind="java" basedOn=":org.eclipse.datatools.connectivity.drivers.IDriverValuesProvider"/>
343
               </appInfo>
348
               </appinfo>
344
            </annotation>
349
            </annotation>
345
         </attribute>
350
         </attribute>
346
         <attribute name="priority" type="string" use="default" value="1">
351
         <attribute name="priority" type="string" use="default" value="1">
Lines 360-366 Link Here
360
         <attribute name="id" type="string">
365
         <attribute name="id" type="string">
361
            <annotation>
366
            <annotation>
362
               <documentation>
367
               <documentation>
363
                  The id attribute, though optional, is required to allow one driverTemplateOverride instance to override another. For example, if driver A has an override B that changes or removes a property, another adopter might implement override C that uses the id of override B as the targetId, thus replacing the overridden driver template with their own. In the case of multiple overrides or overrides of overrides, the priority is taken into account. 
368
                  The id attribute, though optional, is required to allow one driverTemplateOverride instance to override another. For example, if driver A has an override B that changes or removes a property, another adopter might implement override C that uses the id of override B as the targetId, thus replacing the overridden driver template with their own. In the case of multiple overrides or overrides of overrides, the priority is taken into account.
369
               </documentation>
370
            </annotation>
371
         </attribute>
372
         <attribute name="remove" type="boolean">
373
            <annotation>
374
               <documentation>
375
                  Removes the template from the list of available templates.
364
               </documentation>
376
               </documentation>
365
            </annotation>
377
            </annotation>
366
         </attribute>
378
         </attribute>
Lines 452-460 Link Here
452
 
464
 
453
Also note that there is a new interface that your Property Descriptor can extend called org.eclipse.datatools.connectivity.drivers.IDriverInstancePropertyDescriptor. This interface allows you to pass the Driver Instance to your descriptor when it is instantiated in the Edit Driver Definition dialog.
465
Also note that there is a new interface that your Property Descriptor can extend called org.eclipse.datatools.connectivity.drivers.IDriverInstancePropertyDescriptor. This interface allows you to pass the Driver Instance to your descriptor when it is instantiated in the Edit Driver Definition dialog.
454
               </documentation>
466
               </documentation>
455
               <appInfo>
467
               <appinfo>
456
                  <meta.attribute kind="java" basedOn="org.eclipse.ui.views.properties.PropertyDescriptor:" deprecated="true"/>
468
                  <meta.attribute kind="java" basedOn="org.eclipse.ui.views.properties.PropertyDescriptor:" deprecated="true"/>
457
               </appInfo>
469
               </appinfo>
458
            </annotation>
470
            </annotation>
459
         </attribute>
471
         </attribute>
460
         <attribute name="category" type="string">
472
         <attribute name="category" type="string">
Lines 496-504 Link Here
496
               <documentation>
508
               <documentation>
497
                  A migration implementation that allows the provider to perform a specialized migration.  Use this method if you require a more complex migration algorithm (i.e. anything other than simple name and property mapping).
509
                  A migration implementation that allows the provider to perform a specialized migration.  Use this method if you require a more complex migration algorithm (i.e. anything other than simple name and property mapping).
498
               </documentation>
510
               </documentation>
499
               <appInfo>
511
               <appinfo>
500
                  <meta.attribute kind="java" basedOn="org.eclipse.datatools.connectivity.drivers.DriverMigratorBase:org.eclipse.datatools.connectivity.drivers.IDriverMigrator"/>
512
                  <meta.attribute kind="java" basedOn="org.eclipse.datatools.connectivity.drivers.DriverMigratorBase:org.eclipse.datatools.connectivity.drivers.IDriverMigrator"/>
501
               </appInfo>
513
               </appinfo>
502
            </annotation>
514
            </annotation>
503
         </attribute>
515
         </attribute>
504
      </complexType>
516
      </complexType>
Lines 536-553 Link Here
536
   </element>
548
   </element>
537
549
538
   <annotation>
550
   <annotation>
539
      <appInfo>
551
      <appinfo>
540
         <meta.section type="since"/>
552
         <meta.section type="since"/>
541
      </appInfo>
553
      </appinfo>
542
      <documentation>
554
      <documentation>
543
         DTP 0.x
555
         DTP 0.x
544
      </documentation>
556
      </documentation>
545
   </annotation>
557
   </annotation>
546
558
547
   <annotation>
559
   <annotation>
548
      <appInfo>
560
      <appinfo>
549
         <meta.section type="examples"/>
561
         <meta.section type="examples"/>
550
      </appInfo>
562
      </appinfo>
551
      <documentation>
563
      <documentation>
552
         &lt;extension
564
         &lt;extension
553
         point=&quot;org.eclipse.datatools.connectivity.driverExtension&quot;&gt;
565
         point=&quot;org.eclipse.datatools.connectivity.driverExtension&quot;&gt;
Lines 593-619 Link Here
593
   </annotation>
605
   </annotation>
594
606
595
   <annotation>
607
   <annotation>
596
      <appInfo>
608
      <appinfo>
597
         <meta.section type="apiInfo"/>
609
         <meta.section type="apiInfo"/>
598
      </appInfo>
610
      </appinfo>
599
      <documentation>
611
      <documentation>
600
         [Enter API information here.]
612
         [Enter API information here.]
601
      </documentation>
613
      </documentation>
602
   </annotation>
614
   </annotation>
603
615
604
   <annotation>
616
   <annotation>
605
      <appInfo>
617
      <appinfo>
606
         <meta.section type="implementation"/>
618
         <meta.section type="implementation"/>
607
      </appInfo>
619
      </appinfo>
608
      <documentation>
620
      <documentation>
609
         [Enter information about supplied implementation of this extension point.]
621
         [Enter information about supplied implementation of this extension point.]
610
      </documentation>
622
      </documentation>
611
   </annotation>
623
   </annotation>
612
624
613
   <annotation>
625
   <annotation>
614
      <appInfo>
626
      <appinfo>
615
         <meta.section type="copyright"/>
627
         <meta.section type="copyright"/>
616
      </appInfo>
628
      </appinfo>
617
      <documentation>
629
      <documentation>
618
         &lt;p&gt;Copyright (c) 2004-2007 Sybase, Inc.&lt;/p&gt;
630
         &lt;p&gt;Copyright (c) 2004-2007 Sybase, Inc.&lt;/p&gt;
619
&lt;p&gt;All rights reserved. This program and the accompanying materials
631
&lt;p&gt;All rights reserved. This program and the accompanying materials
(-)src/org/eclipse/datatools/connectivity/drivers/models/CategoryDescriptor.java (-1 / +2 lines)
Lines 175-181 Link Here
175
			dt = (TemplateDescriptor) itr.next();
175
			dt = (TemplateDescriptor) itr.next();
176
			if (dt.getParentCategory() != null
176
			if (dt.getParentCategory() != null
177
					&& dt.getParentCategory().equals(getId())) {
177
					&& dt.getParentCategory().equals(getId())) {
178
				dts.add(dt);
178
				if (!dt.getRemoveFlag())
179
					dts.add(dt);
179
			}
180
			}
180
		}
181
		}
181
		return dts;
182
		return dts;
(-)src/org/eclipse/datatools/connectivity/drivers/models/TemplateDescriptor.java (+11 lines)
Lines 284-289 Link Here
284
		return name;
284
		return name;
285
	}
285
	}
286
	
286
	
287
	public boolean getRemoveFlag() {
288
		// First of all check overrides:
289
		OverrideTemplateDescriptor[] overrides = OverrideTemplateDescriptor.getByDriverTemplate(getId());
290
		if (overrides != null && overrides.length > 0) {
291
			if (overrides[0].getRemoveFlag()) {
292
				return overrides[0].getRemoveFlag();
293
			}
294
		}
295
		return false;
296
	}
297
287
	/**
298
	/**
288
	 * Returns the default definition name.
299
	 * Returns the default definition name.
289
	 */
300
	 */
(-)src/org/eclipse/datatools/connectivity/drivers/models/OverrideTemplateDescriptor.java (+7 lines)
Lines 266-271 Link Here
266
		return name;
266
		return name;
267
	}
267
	}
268
268
269
	public boolean getRemoveFlag() {
270
		String name = this.fElement.getAttribute(REMOVE_ATTRIBUTE);
271
		if (name != null && name.trim().equalsIgnoreCase(Boolean.toString(true)))
272
			return true;
273
		return false;
274
	}
275
269
	/**
276
	/**
270
	 * Returns the default definition name.
277
	 * Returns the default definition name.
271
	 */
278
	 */

Return to bug 264520