Examples of updateFormat()


Examples of com.ibm.richtext.textformat.MFormatter.updateFormat()

        MFormatter formatter = makeFormatter(text, 100, true);
        Rectangle viewRect = new Rectangle(0, 0, 100, Integer.MAX_VALUE);

        formatter.stopBackgroundFormatting();
        text.append(new StyledText("\n", PLAIN));
        formatter.updateFormat(text.length()-1, 1, viewRect, ORIGIN);

        _testLineAccess(formatter, 6);

        formatter.stopBackgroundFormatting();
        text.append(new StyledText("ad", PLAIN));
View Full Code Here

Examples of org.drools.repository.AssetItem.updateFormat()

           
            AssetItem ai = repository.loadPackage(packageName).addAsset(fileName, "");
            ai.checkout();
            ai.updateBinaryContentAttachmentFileName(fileName);
            if(extension != null) {
                ai.updateFormat(extension);
            }
            ai.updateBinaryContentAttachment(is);
            ai.getPackage().updateBinaryUpToDate(false);
            ai.checkin("update binary");
            repository.save();
View Full Code Here

Examples of org.drools.repository.AssetItem.updateFormat()

            //Update asset
            ai.checkout();
            ai.updateTitle(assetEntry.getTitle());
            ai.updateDescription(assetEntry.getSummary());
            if (format != null) {
                ai.updateFormat(format);
            }
            if (assetEntry.getContent() != null) {
                ai.updateContent(assetEntry.getContent());
            }
            ai.checkin("Check-in (summary): " + assetEntry.getSummary());
View Full Code Here

Examples of org.drools.repository.AssetItem.updateFormat()

  }

  private void migratePackage(PackageItem pkg) {
    if (!pkg.containsAsset("drools")) {
      AssetItem asset = pkg.addAsset("drools", "");
      asset.updateFormat("package");
      asset.updateContent(pkg.getStringProperty(PackageItem.HEADER_PROPERTY_NAME));
      asset.checkin("");
    }
  }
View Full Code Here

Examples of org.drools.repository.AssetItem.updateFormat()

          } else {
            asset.updateContent(readContent(in));
          }
        } else {
          asset = pkg.addAsset(a[0], "<added remotely>");
          asset.updateFormat(a[1]);
          if (TEXT_ASSET_TYPES.containsKey(a[1])) {
            asset.updateContent(readContent(in));
          } else {
            asset.updateBinaryContentAttachment(in);
          }
View Full Code Here

Examples of org.drools.repository.AssetItem.updateFormat()

            conf.checkin( "" );
        } else {
            conf = pkg.addAsset( "drools",
                                 "" );
            conf.updateFormat( "package" );
            conf.updateContent( string );

            conf.checkin( "" );
        }
View Full Code Here

Examples of org.drools.repository.AssetItem.updateFormat()

            } else {

                AssetItem asset = pkg.addAsset( as.name,
                                                "<imported>" );
                asset.updateFormat( as.format );

                asset.updateContent( as.content );
                asset.updateExternalSource( "Imported from external DRL" );
                if ( newVer ) asset.checkin( "Imported change form external DRL" );
View Full Code Here

Examples of org.drools.repository.AssetItem.updateFormat()

                AssetItem lazarus = packageItem.loadAsset(resource[0]);
                lazarus.archiveItem(false);
            } else {
                AssetItem asset = packageItem.addAsset(resource[0],
                        "");
                asset.updateFormat(resource[1]);
            }
        } else if (isGlobalAreas(path)) {
            String[] resource = AssetItem.getAssetNameFromFileName(path[1]);
            PackageItem packageItem = loadGlobalAreaFromRepository(getRepo());
View Full Code Here

Examples of org.drools.repository.AssetItem.updateFormat()

                AssetItem lazarus = packageItem.loadAsset(resource[0]);
                lazarus.archiveItem(false);
            } else {
                AssetItem asset = packageItem.addAsset(resource[0],
                        "");
                asset.updateFormat(resource[1]);
            }
        } else {
            throw new UnsupportedOperationException("Can't add assets here.");
        }
    }
View Full Code Here

Examples of org.drools.repository.AssetItem.updateFormat()

        assertFalse( pkg.isBinaryUpToDate() );
        DroolsHeader.updateDroolsHeader( "import org.drools.Person",
                                          pkg );
        AssetItem rule1 = pkg.addAsset( "rule_1",
                                        "" );
        rule1.updateFormat( AssetFormats.DRL );
        rule1.updateContent( "rule 'rule1' \n when \np : Person() \n then \np.setAge(42); \n end" );
        rule1.checkin( "" );
        repo.save();
        assertFalse( pkg.isBinaryUpToDate() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.