Giter Club home page Giter Club logo

swiper's Introduction

Swiper

Swiper Metadata Filter for Domino Designer Source Control

Description

Swiper is a plugin for Domino Designer which is used in tandem with the Source Control Enablement. When Domino Design Elements are exported for Source Control, they contain unnecessary metadata which makes Branching and Merging almost impossible due to pointless merge conflicts. Swiper will filter this metadata from the exported files, allowing proper branching and merging.

Swiper is the sucessor to the Dora project. The Dora project was specifically built for use with Git, whereas Swiper can be used for Git, Mercurial, . Installation is also much simpler.

Installation

Swiper is installed to Domino Designer via the plugin installation mechanism

Note: You do not need to install Swiper on the server. It is used at Design-Time only so it is only required to be installed to Domino Designer.

If you have never installed plugins to Designer, you may need to enabled 'Eclipse plugin install' in your Domino Designer preferences. This can be found under 'File -> Preferences' then 'Domino Designer' category. Then in the 'General' group there is a checkbox

Once this is enabled you should see the: File -> Applications -> Install

Choose Search for new features to install Choose 'Add Folder Location' and point to the updatesite folder within the release of Swiper (make sure you unzipped the swiper release zip first)

Click 'Finish' Select the Swiper Feature (Expand the Swiper category to find it) Accept the licence Click ok to install Restart Designer

Usage

Swiper is only designed to work with Projects that are set up for Source Control.

To enable Swiper for a Project, right-click the project and then choose Swiper -> Add Swiper

To remove Swiper from a Project, right-click the project and then choose Swiper -> Remove Swiper

When files are Synchronised From NSF to the On-Disk Project, Swiper will check for newly created metadata files, it will then filter them using the default filter including in the plugin.

When files are Synchronised from On-Disk Project to NSF, Swiper does not Run.

Deliberately Filter a file

Usually you can just rely on Swiper to filter your files as you save them, however you may want to deliberately filter a file without opening and saving.

To force Swiper to Filter a file, Right-Click on it in the Application Navigator and choose Swiper -> Filter Selected

Please note that this right-click menu does not work from the main list of design elements that shows up in the middle. e.g. If you double-click 'Viewes' and then try to right-click a View in the middle 'Views' pane, the option will not show. You need to do it over on the left in the Applications Navigator.

Notes for Projects that previously used Dora

Dora should be uninstalled from the git repo before using swiper. To do run dora from the git Terminal, and then choose uninstall dxl filter.

The default filter supplied with swiper is slightly different, and also the code library for filtering the XML is different. As such there is some minor differences in the output of the filtered metadata. If you encounter these 'changes' you can commit them and you should not be prompted again.

  1. Inclusion of 'encoding' attribute on root element
  2. Removal of 'maintenanceversion' attribute on Root DXL element
  3. Difference in number of EOL characters at the end of the file

Due to these differences, if you are working with other developers on the same project, it is advised that you all switch to Swiper. Alternatively, you can try to mimic Dora by setting some preferences in the Preferences -> Swiper section

Known Bugs

  • Sometimes when creating a new XPage or Custom Control, the system will say 'The contents on disk have changed do you want to reload?' I need to check into this, but just hit no

  • The Swiper menu-option shows up in the normal Notes Client. I plan to put a fix in to prevent this.

Logging

In case we need to figure out what is going on, there is a logger that can be turned on. It will log to a file in your %HOME%/.swiper directory To turn on, Click 'File -> Swiper -> Start Logging' To turn off, Click 'File -> Swiper -> Stop Logging'

Support from YourKit

YourKit have generously granted the Swiper project an Open Source licence to use their excellent Java Profiler.

YourKit Logo

YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.

FAM FAM FAM Silk Icon Set

In the Toolbar buttons I am using some icons from the excellent Silk Icons set by Mark James http://www.famfamfam.com/lab/icons/silk/

swiper's People

Contributors

camac avatar

Stargazers

Vladimir Belov avatar Sven Olding avatar Tali Berzins avatar  avatar Slade Swan avatar Jan Michael Wrangel avatar Martin Holland avatar Daniel Boston avatar Darin Egan avatar Mark Leusink avatar Per Henrik Lausten avatar Csaba Kiss avatar BeranPro avatar Jonas Jonson avatar Eric McCormick avatar Martin Jinoch avatar

Watchers

Per Henrik Lausten avatar Daniel Boston avatar  avatar James Cloos avatar Martin Holland avatar Sean Wong avatar Oliver Busse avatar Eric Tomenga avatar Klaus Heine avatar Slade Swan avatar Tali Berzins avatar

swiper's Issues

9.0.1 FP8 - extension point for Swiper

IBM published FP8 for Notes/Designer and I was told that this includes an extension point in Designer specifically for Swiper. Are you already aware of this? Will you adapt Swiper accordingly and create a new release?

All design elements deleted on first sync

I've experienced a couple of times now that on opening a database that hasn't been opened before (in the current Designer session), the NSF syncs with the ODP and removes all design elements. When all code is committed, that is not a big issue, since I can just revert the changes.

The problem is that I can't reliably reproduce the error, but it seems to occur only in repositories that contain the ODP for multiple NSF's. Anyone seen this behaviour too?

I'm also not sure if this is a Swiper or Designer issue.

Shared actions not filtered

This might be down to our databases structure (they are really old!) but the Share Actions aren´t filtered at all.
image
This is what it looks like in Designer:
image

Any ideas?

Correct way to initiate swiper after FP8?

I'm wondering if there is a correct and less correct way to do this.
Should i add swiper before I add the database to a ondisk project will it filter everything then ?
Or do I still need to add filtering selected.

I'm getting this dialog alot stating that the designer is importing design and recompiling when doing filtering. Is this because the designer detects changed files on disk?
Because it doing this over and over again, I'm filtering scripts and it's importing forms, views.
image

View is unfiltered

Auto Export is On
Built Automatically is On
This is the log as you requested. It seems that Swiper is not triggered at all even if I manually built the project. So far the only way I could make filter to work is to select each design element and manually do Filter Selected.
swiper-log.txt

Question on .metadata filtering

It appears that .metadata files are filtered randomly by Swiper: sometimes they end up correctly in the ODS as a formatted XML document and sometimes it seems that they're not filtered at all. Can you explain why this happens?

I have automatic import & export enabled and build automatically turned off: if I build the application the files are synced to the ODS. I try not to use the Team Dev > Sync option.

Thx!

Files aren't filtered unless Automatic Import / Export is selected

I have automatic Import and Export of data to and from ODP switched off. I also have Build Automatically switched off.

I have an existing NSF/ODP that I have applied Swiper to (1.0.1). When I "Sync with ODP" via Team Development right-click menu, the code is synced but not filtered. I can get it to filter if I right-click the individual element and apply the filter, but would rather not do that. I am not sure if this is how it is designed to work.

Context menu Swiper\Filter Issue

It would seem that using the context menu option Swiper\Filter selected does not obey a configured Custom XSLT Filter. This is observed as there is different "Swipe" behaviour depending upon whether you save a design element or use the context menu option.

Unfortunately turning on logging does not show which xsl file is being used.

FP8 strange behaviour with new version of Swiper

image

If I do a manual sync I get this message that it starts to do an import I don't know if it imports from disk.
I have also started to see that the nsf version and disk version get out of sync, if I do a clean of a project.

Also these kind of "changed content" in source tree but for the visual eye nothing is changed
image

Strange issue after installing Swiper - not sure if it's Swiper

After installing Swiper I'm seeing a strange issue: 'sometimes' (gotta love that in an issue report...) it will show the Sync Conflict dialog for a .metadata file. If I then click on Compare, it compares the conflicted .metadata file from the on-disk version with the Java class file in the database (not the metadata). Could that be a side effect of Swiper? This database doesn't have Swiper enabled yet.

I'm also seeing much more .metadata files marked as 'modified', but I haven't touched those files (or signed it).

Here's a screenshot:

screenshot 2015-12-15 12 33 01

Swiper says it's filtering but I can see it

If I look at logging it says that it's filtering but I can't see that is has done that.
I've used Dora in this project before and everything worked well, but asfter adding swiper it doesn't filter metadata. I did remove the old Dora stuff from the project before adding swiper.

Any ideas?

<record>
    <date>2016-02-17T10:22:59</date>
    <millis>1455700979520</millis>
    <sequence>3217</sequence>
    <level>FINEST</level>
    <class>com.ibm.commons.log.AbstractLogMgr</class>
    <method>log</method>
    <thread>39</thread>
    <message>Swiper: About To FilterPhone24.png.metadata</message>
</record>
<record>
    <date>2016-02-17T10:23:00</date>
    <millis>1455700980540</millis>
    <sequence>3218</sequence>
    <level>INFO</level>
    <class>SwiperUtil</class>
    <method></method>
    <thread>39</thread>
    <message>Swiper: Filtered Phone24.png.metadata</message>
</record>

Whitespace stripped from 'classic' javascript elements might lead to illegal empty elements

When a form, item, .. contains a javascript property (ie. onChange), whitespace is stripped. This might lead to an empty element in xml, which cannot be imported - the Notes note will not be created or updated from ODP.

To reproduce:

Go to a field : onChange (set 'Client' : 'JavaScript'), enter a newline, save.
image

Open the ODP form - the markup for the field is:

  • if saved w/o swiper:
<field type='text' kind='editable' name='ShortDescription'><code
 event='onChange' for='client'><javascript>
 </javascript></code></field>
  • with swiper added:
<field type="text" kind="editable" name="ShortDescription">
    <code event="onChange" for="client">
      <javascript/>
    </code>
</field>

An import from ODP will fail (silent sometimes) due to an empty javascript-element.

Tested with swiper 2.0.1 and Notes Release 9.0.1FP8 SHF216

$POID and ImageRef database not being removed

Item/field $POID with a datetime is showing up in some of my design elements and also in the .metadata files.

Outline/OutlineEntry/ImageRef attribute Database is also showing up with a replica ID which changes as different developers clone to their local NSFs

Does anyone know if it's safe to remove these?

Swiper needs window resize to work propperly

Hey @camac I am facing the problem that I have one main Slider and a second slider that is navigating the main slider. My problem is that I always have to resize the window, so that the swiper is working propperly.

Therefore is it possible to loop the swipers? – It broke everything when I tried this.

I uploaded a live preview of my problem here.
The files are on this branch github-swiper-issue-test in this repo.

The Markup simplified:

The original Markup code is found in this file: repertoire.twig

<container>
   <swiper-container navigation>
      <swiper-slide></swiper-slide></swiper-container>

   <swiper-container main>
      <swiper-slide></swiper-slide></swiper-container>
</container>

The Javascript code is the following:

import { Component, ElementRef } from 'mojiito-core';

@Component({
  selector: '.repertoire'
})
export class RepertoireComponent {

  private static NAV_CONTAINER = 'nav.swiper-container';
  private static WORK_CONTAINER = 'main.swiper-container';

  private navMobile = document.querySelector('.mobile-navigation') as HTMLSelectElement;
  private navigation: Swiper;
  private works: Swiper;

  constructor(private elementRef: ElementRef) {

    this.initSwipers();
    this.navMobile.addEventListener('change', (event: Event) => {
      this.navigation.slideTo(parseInt(this.navMobile.value));
    });
  }

  initSwipers() {

    this.works = new Swiper(RepertoireComponent.WORK_CONTAINER, {
      mousewheelControl: true,
      mousewheelForceToAxis: true,
      mousewheelInvert: true,
      autoHeight: true,
      slidesPerView: 'auto',
    });

    this.navigation = new Swiper(RepertoireComponent.NAV_CONTAINER, {
      spaceBetween: 10,
      grabCursor: true,
      centeredSlides: true,
      slidesPerView: 'auto',
      mousewheelControl: true,
      keyboardControl: true,
      touchRatio: 0.2,
      slideToClickedSlide: true,
      onSlideChangeStart: () => {
        this.navMobile.selectedIndex = this.navigation.activeIndex;
      }
    });

    this.works.params.control = this.navigation;
    this.navigation.params.control = this.works;

  }

}

Tried to install the Prerelease 2.0 beta

If upload the package to an update site and install in using the widget side panel as I usually do it install but nothing shows up in designer.

If I try to install in designer it I get that no acceptable functions can be found or installed.

Any ideas ?

Deleting design element fails with Swiper enabled

In a database that has Swiper (1.0.2) enabled, if I delete a package/ Java classes from Code/Java, the deletions aren't send to the on-disk project: both the .java and .metadata files aren't deleted.

Haven't tested it with other design elements.

Swiper - 9.0.1 FP6

Hi is Swiper supported with Notes Version 9.0.1 FP6?
We keep getting META-Data in commits.

System:
Windows 10
Notes 9.0.1 FP6
latest Swiper donload.

Files aren't filtered (Could not determine the Designer Project)

Hi,
i'm getting the following error message:

<record>
    <date>2015-11-20T11:00:36</date>
    <millis>1448013636558</millis>
    <sequence>50</sequence>
    <level>INFO</level>
    <class>SwiperUtil</class>
    <method></method>
    <thread>2</thread>
    <message>Swiper: **** Performing Explicit Filtering</message>
</record>
<record>
    <date>2015-11-20T11:00:36</date>
    <millis>1448013636558</millis>
    <sequence>51</sequence>
    <level>SEVERE</level>
    <class>com.ibm.commons.log.AbstractLogMgr</class>
    <method>log</method>
    <thread>2</thread>
    <message>Could not determine the Designer Project</message>
</record>

AutoExportImport is on
AutomaticBuild is on

suddenly database.properties pop up in my unstaged files in git

I believe the changes to the and other metadata should be filtered out by Swiper, shouldn't they?
recenlty, I see lots of views and forms popping up in my Unstaged changes in git. I am not sure what I am supposed to do to avoid them.

I right clicked on all my forms, views, xPages, ccs, codes and selected Swiper -> filter on each of them.
All filtered files showed up in my git changed files and I staged them and did a commit.

I'll see if these actions will solve the problem.

Where should I look to check if the builders are on Swiper 2?

The release notes for the 2.0-alpha version mention that I have to remove and then add Swiper to any NSF that is using it. Has to do with updating the attached builders.

Where should I look to check that I've gone through this process in an NSF? I have a lot of NSF's using Swiper and want to keep track of the ones I've updated.

Swiper menu shows in IBM Notes Client right-click menus

When Swiper is installed and you right-click something in IBM notes, for example an application bookmark, the Swiper menu will show in the right-click context menu.

It is not a big deal, as the options are greyed out, but it still shouldn't be there

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.